Show More
@@ -24,7 +24,7 b' fn parse(bytes: &[u8]) -> Result<Vec<Str' | |||||
24 | .map(|line| { |
|
24 | .map(|line| { | |
25 | // Python uses Unicode `str.isalnum` but feature names are all |
|
25 | // Python uses Unicode `str.isalnum` but feature names are all | |
26 | // ASCII |
|
26 | // ASCII | |
27 | if line[0].is_ascii_alphanumeric() { |
|
27 | if line[0].is_ascii_alphanumeric() && line.is_ascii() { | |
28 | Ok(String::from_utf8(line.into()).unwrap()) |
|
28 | Ok(String::from_utf8(line.into()).unwrap()) | |
29 | } else { |
|
29 | } else { | |
30 | Err(()) |
|
30 | Err(()) |
General Comments 0
You need to be logged in to leave comments.
Login now