fix simple clippy lints

This commit is contained in:
klensy
2022-05-21 14:07:18 -04:00
parent b2eba058e6
commit 678059f7d0
21 changed files with 81 additions and 90 deletions

View File

@@ -232,18 +232,18 @@ impl<'tcx> Context<'tcx> {
let mut path = String::new();
for name in &names[..names.len() - 1] {
path.push_str(&name.as_str());
path.push_str(name.as_str());
path.push('/');
}
path.push_str(&item_path(ty, &names.last().unwrap().as_str()));
path.push_str(&item_path(ty, names.last().unwrap().as_str()));
match self.shared.redirections {
Some(ref redirections) => {
let mut current_path = String::new();
for name in &self.current {
current_path.push_str(&name.as_str());
current_path.push_str(name.as_str());
current_path.push('/');
}
current_path.push_str(&item_path(ty, &names.last().unwrap().as_str()));
current_path.push_str(&item_path(ty, names.last().unwrap().as_str()));
redirections.borrow_mut().insert(current_path, path);
}
None => return layout::redirect(&format!("{}{}", self.root_path(), path)),