Skip to content

Commit

Permalink
chore(codegen): Remove unnecessary collecting iterator (#2018)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Oct 22, 2024
1 parent 3009cf5 commit 6856ffe
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,12 @@ fn codegen(
.tempdir()
.unwrap();

let iface_files: Vec<PathBuf> = iface_files
.iter()
.map(|&path| root_dir.join(path))
.collect();

let include_dirs: Vec<PathBuf> = 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);

Expand Down

0 comments on commit 6856ffe

Please sign in to comment.