Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Jan 19, 2024
1 parent 7f44e6e commit 5284dec
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion moksha-core/src/amount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ mod tests {
let amounts = vec![1, 2, 3, 4, 5, 6, 7];
let secrets = SplitAmount::from(amounts.clone()).create_secrets();
assert!(secrets.len() == amounts.len());
assert_eq!(secrets.get(0).unwrap().len(), 24);
assert_eq!(secrets.first().unwrap().len(), 24);
}
}
2 changes: 1 addition & 1 deletion moksha-core/src/blind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ mod tests {
assert!(result.is_ok());
let result = result.unwrap();
assert!(result.clone().len() == 10);
assert!(result.get(0).unwrap().0.amount == 1);
assert!(result.first().unwrap().0.amount == 1);
}

#[test]
Expand Down
10 changes: 5 additions & 5 deletions moksha-mint/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1175,9 +1175,9 @@ mod tests {
assert_eq!(1, keys.keysets.len());
assert_eq!(
64,
keys.keysets.get(0).expect("keyset not found").keys.len()
keys.keysets.first().expect("keyset not found").keys.len()
);
println!("{:#?}", keys.keysets.get(0).unwrap().id);
println!("{:#?}", keys.keysets.first().unwrap().id);
Ok(())
}

Expand Down Expand Up @@ -1213,11 +1213,11 @@ mod tests {
assert_eq!(1, keys.keysets.len());
assert_eq!(
64,
keys.keysets.get(0).expect("keyset not found").keys.len()
keys.keysets.first().expect("keyset not found").keys.len()
);
assert_eq!(
"00f545318e4fad2b",
keys.keysets.get(0).expect("keyset not found").id
keys.keysets.first().expect("keyset not found").id
);
Ok(())
}
Expand All @@ -1233,7 +1233,7 @@ mod tests {
let body = response.into_body().collect().await.unwrap().to_bytes();
let keys: V1Keysets = serde_json::from_slice(&body)?;
assert_eq!(1, keys.keysets.len());
let keyset = keys.keysets.get(0).expect("keyset not found");
let keyset = keys.keysets.first().expect("keyset not found");
assert!(keyset.active);
assert_eq!(CurrencyUnit::Sat, keyset.unit);
assert_eq!("00f545318e4fad2b", keyset.id);
Expand Down
4 changes: 2 additions & 2 deletions moksha-wallet/src/localstore/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ mod tests {

let proofs = tokens
.tokens
.get(0)
.first()
.expect("Tokens is empty")
.proofs
.proofs();
let proof_4 = proofs.get(0).expect("Proof is empty").to_owned();
let proof_4 = proofs.first().expect("Proof is empty").to_owned();
print!("first {:?}", proof_4);

localstore.delete_proofs(&proof_4.into()).await?;
Expand Down

0 comments on commit 5284dec

Please sign in to comment.