diff --git a/crates/rpc/src/validator.rs b/crates/rpc/src/validator.rs index e826ccd..57ac2ad 100644 --- a/crates/rpc/src/validator.rs +++ b/crates/rpc/src/validator.rs @@ -22,6 +22,7 @@ pub struct ValidationError { impl ValidationError { /// Create a new validation error. + #[must_use] pub fn new(code: i64, message: impl Into) -> Self { Self { code, message: message.into() } } diff --git a/crates/traits/src/codec.rs b/crates/traits/src/codec.rs index 26dd0c6..c43980d 100644 --- a/crates/traits/src/codec.rs +++ b/crates/traits/src/codec.rs @@ -11,6 +11,7 @@ pub struct CodecError(pub String); impl CodecError { /// Create a new codec error. + #[must_use] pub fn new(msg: impl Into) -> Self { Self(msg.into()) }