- let files2 = fs::read_dir("tests").unwrap();
- let files3 = fs::read_dir("src/bin").unwrap();
- // For each file, run rustfmt and collect the output
+ let files = files.chain(fs::read_dir("tests").unwrap());
+ let files = files.chain(fs::read_dir("src/bin").unwrap());
+ // turn a DirEntry into a String that represents the relative path to the file
+ let files = files.map(|e| e.unwrap().path().to_str().unwrap().to_owned());
+ // hack because there's no `IntoIterator` impl for `[T; N]`
+ let files = files.chain(Some("src/lib.rs".to_owned()).into_iter());