clippy: Address the issue 'needless-borrow'

Issue from beta verion of clippy:

Error:    --> vm-virtio/src/queue.rs:700:59
    |
700 |             if let Some(used_event) = self.get_used_event(&mem) {
    |                                                           ^^^^ help: change this to: `mem`
    |
    = note: `-D clippy::needless-borrow` implied by `-D warnings`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2021-06-23 13:42:17 -07:00
committed by Sebastien Boeuf
parent 585269ecb9
commit 5825ab2dd4
30 changed files with 74 additions and 74 deletions
+2 -2
View File
@@ -171,7 +171,7 @@ impl RefCount {
if self.ref_table.dirty() {
raw_file.write_pointer_table(
self.refcount_table_offset,
&self.ref_table.get_values(),
self.ref_table.get_values(),
0,
)?;
self.ref_table.mark_clean();
@@ -210,7 +210,7 @@ impl RefCount {
/// Returns the refcount table for this file. This is only useful for debugging.
pub fn ref_table(&self) -> &[u64] {
&self.ref_table.get_values()
self.ref_table.get_values()
}
/// Returns the refcounts stored in the given block.