Skip to content

Commit

Permalink
Fix clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
xevisalle committed Nov 17, 2023
1 parent 515fa21 commit cf0ebe2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion license-provider/src/license_issuer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl LicenseIssuer {
ssk_lp: &SecretSpendKey,
attr_data: &JubJubScalar,
) -> Result<(BlsScalar, Vec<u8>), Error> {
let license = License::new(&attr_data, ssk_lp, request, rng);
let license = License::new(attr_data, ssk_lp, request, rng);
let license_blob = rkyv::to_bytes::<_, MAX_LICENSE_SIZE>(&license)
.expect("License should serialize correctly")
.to_vec();
Expand Down
2 changes: 1 addition & 1 deletion moat-cli-lp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async fn main() -> Result<(), CliError> {
WalletAccessor::create(wallet_path.clone(), psw.clone()).unwrap();
let wallet = Wallet::from_file(wallet_accessor).unwrap();

let (_psk, ssk) = wallet.spending_keys(&wallet.default_address()).unwrap();
let (_psk, ssk) = wallet.spending_keys(wallet.default_address()).unwrap();

let mut interactor = Interactor {
wallet_path,
Expand Down
8 changes: 4 additions & 4 deletions moat-cli-user/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,12 @@ impl Command {
let verifier_path = &wallet_dir_path.join("moat_verifier.dat");

if prover_path.exists() && verifier_path.exists() {
let mut file = File::open(&prover_path)?;
let mut file = File::open(prover_path)?;
let mut prover_bytes = vec![];
file.read_to_end(&mut prover_bytes)?;
let prover = Prover::try_from_bytes(prover_bytes).unwrap();

file = File::open(&verifier_path)?;
file = File::open(verifier_path)?;
let mut verifier_bytes = vec![];
file.read_to_end(&mut verifier_bytes)?;
let verifier =
Expand All @@ -349,10 +349,10 @@ impl Command {
Compiler::compile::<LicenseCircuit>(&pp, LABEL)
.expect("Compiling circuit should succeed");

let mut file = File::create(&prover_path)?;
let mut file = File::create(prover_path)?;
file.write_all(prover.to_bytes().as_slice())?;

file = File::create(&verifier_path)?;
file = File::create(verifier_path)?;
file.write_all(verifier.to_bytes().as_slice())?;

let sh = SetupHolder { prover, verifier };
Expand Down
2 changes: 1 addition & 1 deletion moat-cli-user/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async fn main() -> Result<(), CliError> {
WalletAccessor::create(wallet_path.clone(), psw.clone()).unwrap();
let wallet = Wallet::from_file(wallet_accessor).unwrap();

let (_psk, ssk) = wallet.spending_keys(&wallet.default_address()).unwrap();
let (_psk, ssk) = wallet.spending_keys(wallet.default_address()).unwrap();

let mut interactor = Interactor {
wallet_path,
Expand Down

0 comments on commit cf0ebe2

Please sign in to comment.