Skip to content

Commit

Permalink
Fix clippy warning around useless ?
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Jul 23, 2024
1 parent dc81abc commit aaf49c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn unicode_notation_to_char(unicode_notation: &str) -> Result<char, InvalidChara
let parse = |unicode_notation: &str| -> Option<char> {
let hex_str_number = unicode_notation.strip_prefix("U+")?;
let int_number = u32::from_str_radix(hex_str_number, 16).ok()?;
Some(char::from_u32(int_number)?)
char::from_u32(int_number)
};
parse(unicode_notation).ok_or_else(|| InvalidCharacterType(unicode_notation.to_owned()))
}
Expand Down

0 comments on commit aaf49c4

Please sign in to comment.