1
Fork 0

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

View file

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