Browse Source

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
pull/62/head
Rodolphe Bréard 3 years ago
parent
commit
faf36260ec
  1. 2
      acmed/src/storage.rs

2
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(_) => {

Loading…
Cancel
Save