From 6856ffe34df7a1393eda8da4c409c168651c109e Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 23 Oct 2024 01:34:55 +0900 Subject: [PATCH] chore(codegen): Remove unnecessary collecting iterator (#2018) --- codegen/src/main.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/codegen/src/main.rs b/codegen/src/main.rs index 11e9fcb82..4285ce983 100644 --- a/codegen/src/main.rs +++ b/codegen/src/main.rs @@ -78,19 +78,12 @@ fn codegen( .tempdir() .unwrap(); - let iface_files: Vec = iface_files - .iter() - .map(|&path| root_dir.join(path)) - .collect(); - - let include_dirs: Vec = include_dirs - .iter() - .map(|&path| root_dir.join(path)) - .collect(); + let iface_files = iface_files.iter().map(|&path| root_dir.join(path)); + let include_dirs = include_dirs.iter().map(|&path| root_dir.join(path)); let out_dir = root_dir.join(out_dir); let file_descriptor_set_path = root_dir.join(file_descriptor_set_path); - let fds = protox::compile(&iface_files, &include_dirs).unwrap(); + let fds = protox::compile(iface_files, include_dirs).unwrap(); write_fds(&fds, &file_descriptor_set_path);