Fix cargo clippy

This commit is contained in:
Folyd 2022-12-16 21:03:51 +08:00
parent a446d0bd42
commit eee6b8756c
5 changed files with 5 additions and 5 deletions

View file

@ -159,7 +159,7 @@ impl BooksTask {
serde_json::to_string(&books)?
);
let path = Path::new(&self.dest_path);
fs::write(path, &Minifier::minify_js(contents)).unwrap();
fs::write(path, Minifier::minify_js(contents)).unwrap();
}
Err(error) => {
println!("{:?}", error);

View file

@ -68,7 +68,7 @@ impl LabelsTask {
}
fs::write(
Path::new(&self.dest_path),
&format!(
format!(
"var labelsIndex={};",
serde_json::to_string(&labels).unwrap()
),

View file

@ -86,7 +86,7 @@ impl LintsTask {
let contents = format!("var lintsIndex={};", serde_json::to_string(&lints)?);
let path = Path::new(&self.dest_path);
fs::write(path, &Minifier::minify_js(contents))?;
fs::write(path, Minifier::minify_js(contents))?;
println!("\nGenerate javascript lints index successful!");
Ok(())
}

View file

@ -67,7 +67,7 @@ impl RustcTask {
fs::write(
Path::new(&self.dest_path),
&format!("var rustcIndex={};", serde_json::to_string(&map).unwrap()),
format!("var rustcIndex={};", serde_json::to_string(&map).unwrap()),
)?;
println!("\nGenerate rustc index successful!");
Ok(())

View file

@ -118,7 +118,7 @@ impl TargetsTask {
fs::write(
Path::new(&self.dest_path),
&format!("var targetsIndex={};", serde_json::to_string(&map).unwrap()),
format!("var targetsIndex={};", serde_json::to_string(&map).unwrap()),
)?;
println!("\nGenerate targets index successful!");
Ok(())