Skip to content
Snippets Groups Projects
Verified Commit 54fd6e0c authored by Vincent Lafeychine's avatar Vincent Lafeychine
Browse files

clippy: Fix create_dir

parent d3b06f9e
No related branches found
No related tags found
1 merge request!47Fix most of `clippy::restriction` and `clippy::pedantic`
......@@ -32,7 +32,6 @@ rustflags = [
"-Aclippy::string_lit_as_bytes",
# clippy::restriction
"-Aclippy::create_dir",
"-Aclippy::empty_structs_with_brackets",
"-Aclippy::get_unwrap",
"-Aclippy::if_then_some_else_none",
......
......@@ -721,13 +721,12 @@ impl<'tcx, 'rcx> VerificationCtxt<'tcx, 'rcx> {
info!("outputting generated code to {}", generated_dir_path.to_str().unwrap());
if fs::read_dir(generated_dir_path).is_err() {
warn!("Output directory {:?} does not exist, creating directory", generated_dir_path);
fs::create_dir_all(generated_dir_path).unwrap();
} else {
// purge contents
info!("Removing the contents of the generated directory");
fs::remove_dir_all(generated_dir_path).unwrap();
fs::create_dir(generated_dir_path).unwrap();
}
fs::create_dir_all(generated_dir_path).unwrap();
let code_path = generated_dir_path.join(format!("generated_code_{}.v", stem));
let spec_path = generated_dir_path.join(format!("generated_specs_{}.v", stem));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment