From faf36260ec446ead67ffd1e4852dd10b7dd47071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 7 May 2022 12:25:33 +0200 Subject: [PATCH] Replace `.to_vec()` with `.iter().cloned()` Suggested by clippy as an "unnecessary to owned" https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned --- acmed/src/storage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acmed/src/storage.rs b/acmed/src/storage.rs index a02f9bd..712c73f 100644 --- a/acmed/src/storage.rs +++ b/acmed/src/storage.rs @@ -260,7 +260,7 @@ pub fn write_certificate(fm: &FileManager, data: &[u8]) -> Result<(), Error> { } fn check_files(fm: &FileManager, file_types: &[FileType]) -> bool { - for t in file_types.to_vec() { + for t in file_types.iter().cloned() { let path = match get_file_path(fm, t) { Ok(p) => p, Err(_) => {