Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions svd-rs/src/access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ impl Default for Access {
impl Access {
/// Parse a string into an [`Access`] value, returning [`Option::None`] if the string is not valid.
pub fn parse_str(s: &str) -> Option<Self> {
match s {
match s.to_ascii_lowercase().as_str() {
"read-only" => Some(Self::ReadOnly),
"read-write" => Some(Self::ReadWrite),
"read-writeOnce" => Some(Self::ReadWriteOnce),
"read-writeonce" => Some(Self::ReadWriteOnce),
"write-only" => Some(Self::WriteOnly),
"writeOnce" => Some(Self::WriteOnce),
"writeonce" => Some(Self::WriteOnce),
_ => None,
}
}
Expand Down