Skip to content

Commit d4ea7f4

Browse files
Fix for extraction of extensions starting with 's','x','z' from target features
1 parent 2c7e145 commit d4ea7f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

riscv-target-parser/src/extension.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ impl<'a> TryFrom<&'a str> for Extension {
8282
"v" => Ok(Extension::V),
8383
"h" => Ok(Extension::H),
8484
_ => {
85-
if value.starts_with('Z') {
85+
if value.starts_with('z') {
8686
Ok(Extension::Z(value.to_string()))
87-
} else if value.starts_with('S') {
87+
} else if value.starts_with('s') {
8888
Ok(Extension::S(value.to_string()))
89-
} else if value.starts_with('X') {
89+
} else if value.starts_with('x') {
9090
Ok(Extension::X(value.to_string()))
9191
} else {
9292
Err(Self::Error::UnknownExtension(value))

0 commit comments

Comments
 (0)