Skip to content

Commit

Permalink
replace bool::some with bool::then_some
Browse files Browse the repository at this point in the history
  • Loading branch information
nanderstabel committed Sep 6, 2023
1 parent 72f03ac commit daa0cd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion identity_credential/src/presentation/presentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ where
let verifiable_credentials = Vec::<T>::deserialize(deserializer)?;

(!verifiable_credentials.is_empty())
.then(|| verifiable_credentials)
.then_some(verifiable_credentials)
.ok_or_else(|| de::Error::custom(Error::EmptyVerifiableCredentialsArray))
}

Expand Down

0 comments on commit daa0cd8

Please sign in to comment.