mirror of
https://github.com/huhu/rust-search-extension
synced 2024-11-14 15:47:12 +00:00
Fix cargo clippy
This commit is contained in:
parent
a446d0bd42
commit
eee6b8756c
5 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -68,7 +68,7 @@ impl LabelsTask {
|
|||
}
|
||||
fs::write(
|
||||
Path::new(&self.dest_path),
|
||||
&format!(
|
||||
format!(
|
||||
"var labelsIndex={};",
|
||||
serde_json::to_string(&labels).unwrap()
|
||||
),
|
||||
|
|
|
@ -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(())
|
||||
}
|
||||
|
|
|
@ -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(())
|
||||
|
|
|
@ -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(())
|
||||
|
|
Loading…
Reference in a new issue