Apply some clippy fixes.
This commit is contained in:
parent
1c23065329
commit
fafd85fb30
4
build.rs
4
build.rs
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user