diff --git a/server/src/admin/mksnap.rs b/server/src/admin/mksnap.rs index 00d9542e..8b6ffa49 100644 --- a/server/src/admin/mksnap.rs +++ b/server/src/admin/mksnap.rs @@ -61,7 +61,7 @@ where // if snapshots are enabled or not with `is_snapshot_enabled` snaphandle.snapcfg.as_ref().unsafe_unwrap() }; - let snapengine = SnapshotEngine::new(snapstatus.max, &handle, None); + let snapengine = SnapshotEngine::new(snapstatus.max, handle, None); if snapengine.is_err() { was_engine_error = true; } else if snapstatus.is_busy() { diff --git a/server/src/coredb/htable.rs b/server/src/coredb/htable.rs index 27d4e1ae..72715257 100644 --- a/server/src/coredb/htable.rs +++ b/server/src/coredb/htable.rs @@ -251,7 +251,7 @@ impl Deref for Data { impl Borrow<[u8]> for Data { fn borrow(&self) -> &[u8] { - &self.blob.borrow() + self.blob.borrow() } } diff --git a/server/src/coredb/memstore.rs b/server/src/coredb/memstore.rs index 3eb3d5fe..c670df10 100644 --- a/server/src/coredb/memstore.rs +++ b/server/src/coredb/memstore.rs @@ -233,7 +233,7 @@ impl Namespace { .true_remove_if(&keyspace_idenitifer, |_ks_id, ks_atomic_ref| { // 1 because this should just be us, the one instance // also the keyspace must be empty - ks_atomic_ref.tables.len() == 0 && Arc::strong_count(&ks_atomic_ref) == 1 + ks_atomic_ref.tables.len() == 0 && Arc::strong_count(ks_atomic_ref) == 1 }); if did_remove { Ok(()) @@ -318,7 +318,7 @@ impl Keyspace { self.tables .true_remove_if(&table_identifier, |_table_id, table_atomic_ref| { // 1 because this should just be us, the one instance - Arc::strong_count(&table_atomic_ref) == 1 + Arc::strong_count(table_atomic_ref) == 1 }); if did_remove { Ok(()) diff --git a/server/src/coredb/mod.rs b/server/src/coredb/mod.rs index bd7ca946..b8d5572b 100644 --- a/server/src/coredb/mod.rs +++ b/server/src/coredb/mod.rs @@ -134,7 +134,7 @@ impl CoreDB { match query { Query::SimpleQuery(q) => { con.write_simple_query_header().await?; - queryengine::execute_simple(&self, con, q).await?; + queryengine::execute_simple(self, con, q).await?; con.flush_stream().await?; } // TODO(@ohsayan): Pipeline commands haven't been implemented yet diff --git a/server/src/dbnet/connection.rs b/server/src/dbnet/connection.rs index 6da6657c..56318bf4 100644 --- a/server/src/dbnet/connection.rs +++ b/server/src/dbnet/connection.rs @@ -124,7 +124,7 @@ where if self.get_buffer().is_empty() { return Err(ParseError::Empty); } - protocol::Parser::new(&self.get_buffer()).parse() + protocol::Parser::new(self.get_buffer()).parse() } /// Read a query from the remote end /// diff --git a/server/src/diskstore/snapshot.rs b/server/src/diskstore/snapshot.rs index c98d7101..33eaae70 100644 --- a/server/src/diskstore/snapshot.rs +++ b/server/src/diskstore/snapshot.rs @@ -136,7 +136,7 @@ impl<'a> SnapshotEngine<'a> { "The snapshot file names have invalid characters. This should not happen! Please report an error") ); }; - if SNAP_MATCH.is_match(&file_name) { + if SNAP_MATCH.is_match(file_name) { // Good, the file name matched the format we were expecting // This is a valid snapshot, add it to our `Vec` of snaps snaps.push(path); @@ -309,7 +309,7 @@ fn test_snapshot() { crate::coredb::Data::from(String::from("ohhey")), crate::coredb::Data::from_string(String::from("heya!")), ); - let mut snapengine = SnapshotEngine::new(4, &db, Some(&ourdir)).unwrap(); + let mut snapengine = SnapshotEngine::new(4, &db, Some(ourdir)).unwrap(); let _ = snapengine.mksnap_test(); let current = snapengine.get_snapshots().next().unwrap(); let read_hmap = diskstore::test_deserialize(fs::read(PathBuf::from(current)).unwrap()).unwrap(); diff --git a/server/src/storage/mod.rs b/server/src/storage/mod.rs index 8323e428..15c435da 100644 --- a/server/src/storage/mod.rs +++ b/server/src/storage/mod.rs @@ -356,7 +356,7 @@ fn test_ser_de_few_elements() { assert!(de.len() == cmap.len()); assert!(de .iter() - .all(|kv| cmap.get(kv.key()).unwrap().eq(&kv.value()))); + .all(|kv| cmap.get(kv.key()).unwrap().eq(kv.value()))); } cfg_test!( @@ -380,7 +380,7 @@ cfg_test!( let de = deserialize(ser).unwrap(); assert!(de .iter() - .all(|kv| cmap.get(kv.key()).unwrap().eq(&kv.value()))); + .all(|kv| cmap.get(kv.key()).unwrap().eq(kv.value()))); assert!(de.len() == cmap.len()); }