Skip to content

Commit

Permalink
Fix as per clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-mysten committed Dec 5, 2024
1 parent ae27938 commit 4bb63e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/sui-sdk-types/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ mod signing_message {
hasher.finalize()
}

impl<'a> PersonalMessage<'a> {
impl PersonalMessage<'_> {
pub fn signing_digest(&self) -> SigningDigest {
const INTENT: Intent = Intent {
scope: IntentScope::PersonalMessage,
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-sdk-types/src/types/crypto/zklogin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ mod serialization {

struct Inner<'a>(&'a [Bn254FieldElement; 2]);

impl<'a> Serialize for Inner<'a> {
impl Serialize for Inner<'_> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-sdk-types/src/types/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ mod serialization {
}),
) => {
// check id matches in contents
if !id_opt(&contents).is_some_and(|id| id == object_id) {
if id_opt(&contents).is_none_or(|id| id != object_id) {
return Err(serde::de::Error::custom("id from contents doesn't match"));
}

Expand Down Expand Up @@ -890,7 +890,7 @@ mod serialization {
}),
) => {
// check id matches in contents
if !id_opt(&contents).is_some_and(|id| id == object_id) {
if id_opt(&contents).is_none_or(|id| id != object_id) {
return Err(serde::de::Error::custom("id from contents doesn't match"));
}

Expand Down

0 comments on commit 4bb63e6

Please sign in to comment.