Apply some clippy fixes.

This commit is contained in:
Tom Alexander 2023-10-16 16:23:50 -04:00
parent 1c23065329
commit fafd85fb30
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -14,7 +14,7 @@ use walkdir::WalkDir;
fn main() { fn main() {
let out_dir = env::var("OUT_DIR").unwrap(); let out_dir = env::var("OUT_DIR").unwrap();
let destination = Path::new(&out_dir).join("tests.rs"); let destination = Path::new(&out_dir).join("tests.rs");
let mut test_file = File::create(&destination).unwrap(); let mut test_file = File::create(destination).unwrap();
// Re-generate the tests if any org-mode files change // Re-generate the tests if any org-mode files change
println!("cargo:rerun-if-changed=org_mode_samples"); println!("cargo:rerun-if-changed=org_mode_samples");
@ -51,7 +51,7 @@ fn write_test(test_file: &mut File, test: &walkdir::DirEntry) {
.to_lowercase() .to_lowercase()
.strip_suffix(".org") .strip_suffix(".org")
.expect("Should have .org extension") .expect("Should have .org extension")
.replace("/", "_"); .replace('/', "_");
write!( write!(
test_file, test_file,