mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-18 09:04:21 +01:00
note: fix from_hex crash on bad note ids
This commit is contained in:
@@ -29,7 +29,7 @@ impl NoteId {
|
||||
}
|
||||
|
||||
pub fn from_hex(hex_str: &str) -> Result<Self, Error> {
|
||||
let evid = NoteId(hex::decode(hex_str)?.as_slice().try_into().unwrap());
|
||||
let evid = NoteId(hex::decode(hex_str)?.as_slice().try_into()?);
|
||||
Ok(evid)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user