Skip to content

Commit

Permalink
chore: clippy and fmt
Browse files Browse the repository at this point in the history
Signed-off-by: bwty <[email protected]>
  • Loading branch information
whalelephant committed Jan 3, 2023
1 parent bd1ec40 commit 2a5ee83
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions anoncreds/src/data_types/anoncreds/rev_reg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ pub mod serde_revocation_list {
{
let mut seq = s.serialize_seq(Some(state.len()))?;
for element in state {
let e = match element.as_ref() {
&true => 1,
&false => 0,
let e = match *element.as_ref() {
true => 1,
false => 0,
};
seq.serialize_element(&e)?;
}
Expand Down
2 changes: 1 addition & 1 deletion anoncreds/src/ffi/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub extern "C" fn anoncreds_create_credential(
}
let rev_reg_id = rev_reg_id
.as_opt_str()
.map(|i| RevocationRegistryId::new(i))
.map(RevocationRegistryId::new)
.transpose()?;
let enc_values = attr_enc_values.as_slice();
let mut cred_values = MakeCredentialValues::default();
Expand Down
2 changes: 1 addition & 1 deletion anoncreds/src/services/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ fn _create_index_deltas(
revoked: &mut HashSet<u32>,
) {
for i in delta.iter_ones() {
if list[i] == true {
if list[i] {
// true means cred has been revoked
revoked.insert(i as u32);
} else {
Expand Down
4 changes: 2 additions & 2 deletions anoncreds/src/services/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ fn compare_timestamps_from_proof_and_request(
//
// Otherwise the Identifier for the referent (attribute) has to have a timestamp,
// which was added by the prover when creating `PresentCredentials`,
// an arg for `create_presentation`.
//
// an arg for `create_presentation`.
//
// TODO: this timestamp should be compared with the provided interval
fn validate_timestamp(
received_: &HashMap<String, Identifier>,
Expand Down

0 comments on commit 2a5ee83

Please sign in to comment.