Fix clippy::redundant_slicing

This commit is contained in:
Eric Huss 2025-04-20 19:15:51 -07:00
parent fbc875dd9f
commit b0ef5a54cc

View file

@ -39,12 +39,7 @@ impl HelperDef for ResourceHelper {
let path_to_root = utils::fs::path_to_root(&base_path);
out.write(&path_to_root)?;
out.write(
self.hash_map
.get(&param[..])
.map(|p| &p[..])
.unwrap_or(&param),
)?;
out.write(self.hash_map.get(param).map(|p| &p[..]).unwrap_or(&param))?;
Ok(())
}
}