Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Sang committed Dec 2, 2024
1 parent b2b4dd6 commit 36c4060
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plexi_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ impl TryFrom<HashMap<String, String>> for Report {
.map_err(|_| PlexiError::BadParameter("key_id".to_string()))?,
serialized_message: value
.get("serialized_message")
.map(|msg| hex::decode(msg))
.map(hex::decode)
.transpose()
.map_err(|_| PlexiError::BadParameter("serialized_message".to_string()))?,
})
Expand Down Expand Up @@ -621,7 +621,7 @@ impl Serialize for SignatureResponse {
where
S: Serializer,
{
let sm = self.serialized_message.as_ref().map(|m| hex::encode(m));
let sm = self.serialized_message.as_ref().map(hex::encode);
let tsp = TempSignatureResponse {
ciphersuite: Some(self.ciphersuite),
version: Some(self.ciphersuite),
Expand Down Expand Up @@ -663,7 +663,7 @@ where
};
let sm = temp
.serialized_message
.map(|m| hex::decode(m))
.map(hex::decode)
.transpose()
.map_err(|_| de::Error::custom("serialized_message should be hex encoded"))?;
Ok(SignatureResponse {
Expand Down

0 comments on commit 36c4060

Please sign in to comment.