1
Fork 0

rustdoc: clippy::complexity fixes

clippy::map_flatten
clippy::clone_on_copy
clippy::useless_conversion
clippy::needless_arbitrary_self_type
This commit is contained in:
Matthias Krüger 2022-02-03 22:28:19 +01:00
parent 4e8fb743cc
commit f1a399abaa
7 changed files with 7 additions and 13 deletions

View file

@ -81,7 +81,7 @@ crate fn build_index<'tcx>(krate: &clean::Crate, cache: &mut Cache, tcx: TyCtxt<
lastpathid += 1;
if let Some(&(ref fqp, short)) = paths.get(&defid) {
crate_paths.push((short, fqp.last().unwrap().clone()));
crate_paths.push((short, *fqp.last().unwrap()));
Some(pathid)
} else {
None