Przeglądaj źródła

chore: clippy elided lifetimes

skoupidi 1 rok temu
rodzic
commit
b32c2686a5

+ 1 - 1
bin/drk/src/walletdb.rs

@@ -303,7 +303,7 @@ impl<'a> WalletStorage<'a> {
     }
 }
 
-impl<'a> StorageAdapter for WalletStorage<'a> {
+impl StorageAdapter for WalletStorage<'_> {
     type Value = pallas::Base;
 
     fn put(&mut self, key: BigUint, value: pallas::Base) -> ContractResult {

+ 1 - 1
src/contract/dao/src/client/propose.rs

@@ -62,7 +62,7 @@ pub struct DaoProposeCall<'a, T: StorageAdapter<Value = pallas::Base>> {
     pub signature_secret: SecretKey,
 }
 
-impl<'a, T: StorageAdapter<Value = pallas::Base>> DaoProposeCall<'a, T> {
+impl<T: StorageAdapter<Value = pallas::Base>> DaoProposeCall<'_, T> {
     pub fn make(
         self,
         burn_zkbin: &ZkBinary,

+ 1 - 1
src/contract/dao/src/client/vote.rs

@@ -64,7 +64,7 @@ pub struct DaoVoteCall<'a, T: StorageAdapter<Value = pallas::Base>> {
     pub current_blockwindow: u64,
 }
 
-impl<'a, T: StorageAdapter<Value = pallas::Base>> DaoVoteCall<'a, T> {
+impl<T: StorageAdapter<Value = pallas::Base>> DaoVoteCall<'_, T> {
     pub fn make(
         self,
         burn_zkbin: &ZkBinary,

+ 1 - 1
src/runtime/import/smt.rs

@@ -41,7 +41,7 @@ pub struct SledStorage<'a> {
     tree_key: &'a [u8],
 }
 
-impl<'a> StorageAdapter for SledStorage<'a> {
+impl StorageAdapter for SledStorage<'_> {
     type Value = pallas::Base;
 
     fn put(&mut self, key: BigUint, value: pallas::Base) -> ContractResult {

+ 1 - 1
src/runtime/memory.rs

@@ -24,7 +24,7 @@ pub trait MemoryManipulation {
     fn write_slice(&self, value_slice: &[u8], mem_offset: u32) -> Result<()>;
 }
 
-impl<'a> MemoryManipulation for MemoryView<'a> {
+impl MemoryManipulation for MemoryView<'_> {
     fn write_slice(&self, value_slice: &[u8], mem_offset: u32) -> Result<()> {
         // Prepare WasmPtr
         let ptr: WasmPtr<u8> = WasmPtr::new(mem_offset);

+ 2 - 2
src/sdk/src/crypto/blind.rs

@@ -54,11 +54,11 @@ impl<F: Field + EncDecode> Blind<F> {
     }
 }
 
-impl<'a, 'b, F: Field + EncDecode> std::ops::Add<&'b Blind<F>> for &'a Blind<F> {
+impl<'a, F: Field + EncDecode> std::ops::Add<&'a Blind<F>> for &Blind<F> {
     type Output = Blind<F>;
 
     #[inline]
-    fn add(self, rhs: &'b Blind<F>) -> Blind<F> {
+    fn add(self, rhs: &'a Blind<F>) -> Blind<F> {
         Blind(self.0.add(rhs.0))
     }
 }

+ 1 - 1
src/sdk/src/hex.rs

@@ -38,7 +38,7 @@ pub struct HexDecodeIter<'a> {
     curr: usize,
 }
 
-impl<'a> Iterator for HexDecodeIter<'a> {
+impl Iterator for HexDecodeIter<'_> {
     type Item = GenericResult<u8>;
 
     // FromIterator auto converts [Result<u8>, ...] into Result<[u8, ...]>

+ 1 - 1
src/system/condvar.rs

@@ -102,7 +102,7 @@ pub struct CondVarWait<'a> {
     state: &'a Mutex<CondVarState>,
 }
 
-impl<'a> Future for CondVarWait<'a> {
+impl Future for CondVarWait<'_> {
     type Output = ();
 
     fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {