Skip to content

Commit

Permalink
Panic if ConvertingSerializer returns error
Browse files Browse the repository at this point in the history
  • Loading branch information
vsbogd committed Nov 14, 2024
1 parent 0504d23 commit 7a6b1f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/atom/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub trait Serializer {
}

/// Serialization error code
#[derive(Debug)]
pub enum Error {
/// Serialization of the type is not supported by serializer.
NotSupported,
Expand All @@ -52,7 +53,7 @@ pub trait ConvertingSerializer<T>: Serializer {
.cloned()
.or_else(|| {
let mut serializer = Self::default();
let _ = gnd.serialize(&mut serializer);
gnd.serialize(&mut serializer).expect("ConvertingSerializer is not expected returning error");
serializer.into_type()
})
})
Expand Down

0 comments on commit 7a6b1f0

Please sign in to comment.