From cc243f413a9e382b92a7fbfac55af58866665fbd Mon Sep 17 00:00:00 2001 From: beeb Date: Sun, 8 Jan 2023 13:08:27 +0100 Subject: [PATCH] refactor: no need to consume iterator items --- src/scanner.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scanner.rs b/src/scanner.rs index f5aae5a..80217bf 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -73,8 +73,8 @@ fn index_files(files: Vec, connection: &sqlite::Connection) -> Result<() .collect(); hashed - .into_iter() - .try_for_each(|file| database::put(&file, connection)) + .iter() + .try_for_each(|file| database::put(file, connection)) } pub fn hash_file(filepath: &str) -> Result {