From 67d89dc1ce30d50d1115c5d06fee9068b9ab4069 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 3 Oct 2022 12:05:17 +0700 Subject: [PATCH] clippy: Fix needless-borrow warnings. These show on nightly clippy. --- src/directory/mmap_directory.rs | 2 +- src/query/boolean_query/boolean_weight.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/directory/mmap_directory.rs b/src/directory/mmap_directory.rs index 9450040de0..9e09367e26 100644 --- a/src/directory/mmap_directory.rs +++ b/src/directory/mmap_directory.rs @@ -304,7 +304,7 @@ pub(crate) fn atomic_write(path: &Path, content: &[u8]) -> io::Result<()> { "Path {:?} does not have parent directory.", ) })?; - let mut tempfile = tempfile::Builder::new().tempfile_in(&parent_path)?; + let mut tempfile = tempfile::Builder::new().tempfile_in(parent_path)?; tempfile.write_all(content)?; tempfile.flush()?; tempfile.as_file_mut().sync_data()?; diff --git a/src/query/boolean_query/boolean_weight.rs b/src/query/boolean_query/boolean_weight.rs index 9bedb379a3..859c3dde44 100644 --- a/src/query/boolean_query/boolean_weight.rs +++ b/src/query/boolean_query/boolean_weight.rs @@ -174,9 +174,9 @@ impl Weight for BooleanWeight