Skip to content

Commit

Permalink
misc: Fix all clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Skallwar committed Apr 24, 2022
1 parent 0171c62 commit b09c9b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ pub fn save_file(file_name: &str, content: &[u8], path: &Option<PathBuf>) {
};

if let Some(parent) = path.parent() {
match fs::create_dir_all(parent) {
Err(err) => {
error!("Couldn't create folder {}: {}", parent.display(), err);
}
Ok(()) => (),
if let Err(err) = fs::create_dir_all(parent) {
error!("Couldn't create folder {}: {}", parent.display(), err);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/scraper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl Scraper {
Vec::from(data)
};

let dom = dom::Dom::new(&String::from_utf8_lossy(&utf8_data).into_owned());
let dom = dom::Dom::new(&String::from_utf8_lossy(&utf8_data));
let source_path = match scraper.path_map.lock().unwrap().get(url.as_str()) {
Some(path) => path.clone(),
None => error!("Url {} was not found in the path map", url.as_str()),
Expand Down

0 comments on commit b09c9b4

Please sign in to comment.