Skip to content

Commit

Permalink
fix: update rust-toolchain
Browse files Browse the repository at this point in the history
fix: all required clippy updates
  • Loading branch information
cryptonemo committed Jan 6, 2025
1 parent 6e53c05 commit a616f90
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion fr32/src/padding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ fn clear_right_bits(byte: &mut u8, offset: usize) {
*(byte) &= !((1 << offset) - 1)
}

/** Padding process.
/* Padding process.
Read a `source` of raw byte-aligned data, pad it in a bit stream and
write a byte-aligned version of it in the `target`. The `target` needs
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.81.0
1.83.0
2 changes: 1 addition & 1 deletion storage-proofs-core/benches/blake2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct Blake2sExample<'a> {
data: &'a [Option<bool>],
}

impl<'a> Circuit<Fr> for Blake2sExample<'a> {
impl Circuit<Fr> for Blake2sExample<'_> {
fn synthesize<CS: ConstraintSystem<Fr>>(self, cs: &mut CS) -> Result<(), SynthesisError> {
let data: Vec<Boolean> = self
.data
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-core/benches/sha256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct Sha256Example<'a> {
data: &'a [Option<bool>],
}

impl<'a> Circuit<Fr> for Sha256Example<'a> {
impl Circuit<Fr> for Sha256Example<'_> {
fn synthesize<CS: ConstraintSystem<Fr>>(self, cs: &mut CS) -> Result<(), SynthesisError> {
let data: Vec<Boolean> = self
.data
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-core/benches/xor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct XorExample<'a> {
data: &'a [Option<bool>],
}

impl<'a> Circuit<Fr> for XorExample<'a> {
impl Circuit<Fr> for XorExample<'_> {
fn synthesize<CS: ConstraintSystem<Fr>>(self, cs: &mut CS) -> Result<(), SynthesisError> {
let key: Vec<Boolean> = self
.key
Expand Down
10 changes: 5 additions & 5 deletions storage-proofs-core/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ enum RawData<'a> {
Mmap(MmapMut),
}

impl<'a> Deref for RawData<'a> {
impl Deref for RawData<'_> {
type Target = [u8];

fn deref(&self) -> &Self::Target {
Expand All @@ -32,7 +32,7 @@ impl<'a> Deref for RawData<'a> {
}
}

impl<'a> DerefMut for RawData<'a> {
impl DerefMut for RawData<'_> {
fn deref_mut(&mut self) -> &mut Self::Target {
match self {
RawData::Slice(ref mut raw) => raw,
Expand All @@ -52,7 +52,7 @@ impl<'a> From<&'a mut [u8]> for Data<'a> {
}
}

impl<'a> From<(MmapMut, PathBuf)> for Data<'a> {
impl From<(MmapMut, PathBuf)> for Data<'_> {
fn from(raw: (MmapMut, PathBuf)) -> Self {
let len = raw.0.len();
Data {
Expand All @@ -63,7 +63,7 @@ impl<'a> From<(MmapMut, PathBuf)> for Data<'a> {
}
}

impl<'a> AsRef<[u8]> for Data<'a> {
impl AsRef<[u8]> for Data<'_> {
fn as_ref(&self) -> &[u8] {
match self.raw {
Some(ref raw) => raw,
Expand All @@ -72,7 +72,7 @@ impl<'a> AsRef<[u8]> for Data<'a> {
}
}

impl<'a> AsMut<[u8]> for Data<'a> {
impl AsMut<[u8]> for Data<'_> {
fn as_mut(&mut self) -> &mut [u8] {
match self.raw {
Some(ref mut raw) => raw,
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-porep/src/stacked/vanilla/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ where
}
}

impl<'a, Tree> From<&'a PublicParams<Tree>> for PublicParams<Tree>
impl<Tree> From<&PublicParams<Tree>> for PublicParams<Tree>
where
Tree: MerkleTreeTrait,
{
Expand Down
4 changes: 2 additions & 2 deletions storage-proofs-porep/src/stacked/vanilla/proof_scheme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use crate::stacked::vanilla::{
proof::StackedDrg,
};

impl<'a, 'c, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> ProofScheme<'a>
for StackedDrg<'c, Tree, G>
impl<Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> ProofScheme<'_>
for StackedDrg<'_, Tree, G>
{
type PublicParams = PublicParams<Tree>;
type SetupParams = SetupParams;
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-porep/src/stacked/vanilla/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct UnsafeSlice<'a, T> {
len: usize,
}

unsafe impl<'a, T> Sync for UnsafeSlice<'a, T> {}
unsafe impl<T> Sync for UnsafeSlice<'_, T> {}

impl<'a, T> UnsafeSlice<'a, T> {
/// Takes mutable slice, to ensure that `UnsafeSlice` is the only user of this memory, until it gets dropped.
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-update/src/compound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ where
}
}

impl<'a, TreeR> CompoundProof<'a, EmptySectorUpdate<TreeR>, EmptySectorUpdateCircuit<TreeR>>
impl<TreeR> CompoundProof<'_, EmptySectorUpdate<TreeR>, EmptySectorUpdateCircuit<TreeR>>
for EmptySectorUpdateCompound<TreeR>
where
TreeR: 'static + MerkleTreeTrait<Hasher = TreeRHasher>,
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-update/src/poseidon/compound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ where
}
}

impl<'a, TreeR> CompoundProof<'a, EmptySectorUpdate<TreeR>, EmptySectorUpdateCircuit<TreeR>>
impl<TreeR> CompoundProof<'_, EmptySectorUpdate<TreeR>, EmptySectorUpdateCircuit<TreeR>>
for EmptySectorUpdateCompound<TreeR>
where
TreeR: 'static + MerkleTreeTrait<Hasher = TreeRHasher>,
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-update/src/poseidon/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ where
_tree_r: PhantomData<TreeR>,
}

impl<'a, TreeR> ProofScheme<'a> for EmptySectorUpdate<TreeR>
impl<TreeR> ProofScheme<'_> for EmptySectorUpdate<TreeR>
where
TreeR: 'static + MerkleTreeTrait<Hasher = TreeRHasher>,
{
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-update/src/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ where
_tree_r: PhantomData<TreeR>,
}

impl<'a, TreeR> ProofScheme<'a> for EmptySectorUpdate<TreeR>
impl<TreeR> ProofScheme<'_> for EmptySectorUpdate<TreeR>
where
TreeR: 'static + MerkleTreeTrait<Hasher = TreeRHasher>,
{
Expand Down

0 comments on commit a616f90

Please sign in to comment.