Skip to content

Commit b0ef5a5

Browse files
committed
Fix clippy::redundant_slicing
1 parent fbc875d commit b0ef5a5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/renderer/html_handlebars/helpers/resources.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ impl HelperDef for ResourceHelper {
3939
let path_to_root = utils::fs::path_to_root(&base_path);
4040

4141
out.write(&path_to_root)?;
42-
out.write(
43-
self.hash_map
44-
.get(&param[..])
45-
.map(|p| &p[..])
46-
.unwrap_or(&param),
47-
)?;
42+
out.write(self.hash_map.get(param).map(|p| &p[..]).unwrap_or(&param))?;
4843
Ok(())
4944
}
5045
}

0 commit comments

Comments
 (0)