Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Clippy 🤦
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Aug 18, 2022
1 parent 0616c78 commit bd972a2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions client/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ impl<Block: BlockT> Backend<Block> {
let number = header.number();
let hash = header.hash();

self.set_head_with_transaction(&mut transaction, hash.clone(), (*number, hash))?;
self.set_head_with_transaction(&mut transaction, hash, (*number, hash))?;

meta_updates.push(MetaUpdate {
hash,
Expand Down Expand Up @@ -2244,7 +2244,7 @@ impl<Block: BlockT> sc_client_api::backend::Backend<Block> for Backend<Block> {
};
if is_genesis {
if let Some(genesis_state) = &*self.genesis_state.read() {
let root = genesis_state.root.clone();
let root = genesis_state.root;
let db_state = DbStateBuilder::<Block>::new(genesis_state.clone(), root)
.with_optional_cache(self.shared_trie_cache.as_ref().map(|c| c.local_cache()))
.build();
Expand Down
2 changes: 1 addition & 1 deletion primitives/state-machine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,7 @@ mod tests {

let trie: InMemoryBackend<BlakeTwo256> =
(storage.clone(), StateVersion::default()).into();
let trie_root = trie.root().clone();
let trie_root = *trie.root();
let backend = TrieBackendBuilder::wrap(&trie).with_recorder(Default::default()).build();
let mut queries = Vec::new();
for c in 0..(5 + nb_child_trie / 2) {
Expand Down
4 changes: 2 additions & 2 deletions primitives/state-machine/src/trie_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1055,11 +1055,11 @@ pub mod tests {
&b"doesnotexist2"[..],
];

fn check_estimation<'a>(
fn check_estimation(
backend: TrieBackend<
impl TrieBackendStorage<BlakeTwo256>,
BlakeTwo256,
&'a LocalTrieCache<BlakeTwo256>,
&'_ LocalTrieCache<BlakeTwo256>,
>,
has_cache: bool,
) {
Expand Down
6 changes: 3 additions & 3 deletions primitives/trie/src/cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ mod tests {

let storage_proof = recorder.drain_storage_proof();
let mut memory_db: MemoryDB = storage_proof.into_memory_db();
let mut proof_root = root.clone();
let mut proof_root = root;

{
let mut trie =
Expand Down Expand Up @@ -619,7 +619,7 @@ mod tests {
.node_cache()
.lru
.iter()
.map(|d| d.0.clone())
.map(|d| *d.0)
.collect::<Vec<_>>();

// Delete the value cache, so that we access the nodes.
Expand All @@ -644,7 +644,7 @@ mod tests {
.node_cache()
.lru
.iter()
.map(|d| d.0.clone())
.map(|d| *d.0)
.collect::<Vec<_>>()
);
}
Expand Down

0 comments on commit bd972a2

Please sign in to comment.