Skip to content

Commit 2a7048f

Browse files
committed
lints
1 parent 2952b8e commit 2a7048f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

masp_proofs/src/downloadreader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl io::Read for ResponseLazyReader {
6262
let error = format!("download response failed: {:?}", error);
6363

6464
*self = Complete(Err(error.clone()));
65-
return Err(io::Error::new(io::ErrorKind::Other, error));
65+
return Err(io::Error::other(error));
6666
}
6767
}
6868
}
@@ -75,7 +75,7 @@ impl io::Read for ResponseLazyReader {
7575
// Return a zero-byte read for download success and EOF.
7676
Ok(()) => Ok(0),
7777
// Keep returning the download error,
78-
Err(error) => Err(io::Error::new(io::ErrorKind::Other, error.clone())),
78+
Err(error) => Err(io::Error::other(error.clone())),
7979
};
8080
}
8181
}

masp_proofs/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ fn fetch_params(
142142
timeout: Option<u64>,
143143
) -> Result<PathBuf, minreq::Error> {
144144
// Ensure that the default MASP parameters location exists.
145-
let params_dir = default_params_folder().ok_or_else(|| {
146-
io::Error::new(io::ErrorKind::Other, "Could not load default params folder")
147-
})?;
145+
let params_dir = default_params_folder()
146+
.ok_or_else(|| io::Error::other("Could not load default params folder"))?;
148147
std::fs::create_dir_all(&params_dir)?;
149148

150149
let params_path = params_dir.join(name);

masp_proofs/src/sapling/verifier/batch.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#[cfg(feature = "benchmarks")]
2+
use bellman::groth16::prepare_verifying_key;
13
use bellman::groth16::{PreparedVerifyingKey, Proof};
24
use bellman::{SynthesisError, groth16};
35
use bls12_381::Bls12;

0 commit comments

Comments
 (0)