don't convert types into identical types with .into() (clippy::useless_conversion)

This commit is contained in:
Matthias Krüger 2020-12-11 17:40:59 +01:00
parent 5c8de1cf49
commit 82fe5c1662
2 changed files with 3 additions and 4 deletions

View File

@ -285,7 +285,7 @@ impl DebugCounters {
),
};
counters
.insert(id.into(), DebugCounter::new(counter_kind.clone(), some_block_label))
.insert(id, DebugCounter::new(counter_kind.clone(), some_block_label))
.expect_none(
"attempt to add the same counter_kind to DebugCounters more than once",
);
@ -340,7 +340,7 @@ impl DebugCounters {
if self.some_counters.is_some() && (counter_format.block || !counter_format.id) {
let counters = self.some_counters.as_ref().unwrap();
if let Some(DebugCounter { some_block_label: Some(block_label), .. }) =
counters.get(&id.into())
counters.get(&id)
{
return if counter_format.id {
format!("{}#{}", block_label, id.index())

View File

@ -1012,7 +1012,6 @@ impl LinkCollector<'_, '_> {
} else {
// This is a bug.
debug!("attempting to resolve item without parent module: {}", path_str);
let err_kind = ResolutionFailure::NoParentItem.into();
resolution_failure(
self,
&item,
@ -1020,7 +1019,7 @@ impl LinkCollector<'_, '_> {
disambiguator,
dox,
link_range,
smallvec![err_kind],
smallvec![ResolutionFailure::NoParentItem],
);
return None;
};