note: fix from_hex crash on bad note ids
This commit is contained in:
1 parent
f496d4b8c4
commit
a33aad1f62
1 file changed
+1
-1
@@ -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