mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-27 13:40:49 +00:00
Avoid clone() call
This commit is contained in:
@@ -71,8 +71,7 @@ impl Drop for FileProtection {
|
||||
/// Saves the file containing the list of existing files
|
||||
/// that were created by tantivy.
|
||||
fn save_managed_paths(directory: &mut Directory, wlock: &RwLockWriteGuard<MetaInformation>) -> io::Result<()> {
|
||||
let managed_paths = wlock.managed_paths.clone();
|
||||
let mut w = serde_json::to_vec(&managed_paths)?;
|
||||
let mut w = serde_json::to_vec(&wlock.managed_paths)?;
|
||||
write!(&mut w, "\n")?;
|
||||
directory.atomic_write(&MANAGED_FILEPATH, &w[..])?;
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user