Skip to content

Commit b09c9b4

Browse files
committed
misc: Fix all clippy warnings
1 parent 0171c62 commit b09c9b4

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/disk.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ pub fn save_file(file_name: &str, content: &[u8], path: &Option<PathBuf>) {
1616
};
1717

1818
if let Some(parent) = path.parent() {
19-
match fs::create_dir_all(parent) {
20-
Err(err) => {
21-
error!("Couldn't create folder {}: {}", parent.display(), err);
22-
}
23-
Ok(()) => (),
19+
if let Err(err) = fs::create_dir_all(parent) {
20+
error!("Couldn't create folder {}: {}", parent.display(), err);
2421
}
2522
}
2623

src/scraper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl Scraper {
176176
Vec::from(data)
177177
};
178178

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

0 commit comments

Comments
 (0)