Skip to content

Commit 82fe5c1

Browse files
committed
don't convert types into identical types with .into() (clippy::useless_conversion)
1 parent 5c8de1c commit 82fe5c1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

compiler/rustc_mir/src/transform/coverage/debug.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl DebugCounters {
285285
),
286286
};
287287
counters
288-
.insert(id.into(), DebugCounter::new(counter_kind.clone(), some_block_label))
288+
.insert(id, DebugCounter::new(counter_kind.clone(), some_block_label))
289289
.expect_none(
290290
"attempt to add the same counter_kind to DebugCounters more than once",
291291
);
@@ -340,7 +340,7 @@ impl DebugCounters {
340340
if self.some_counters.is_some() && (counter_format.block || !counter_format.id) {
341341
let counters = self.some_counters.as_ref().unwrap();
342342
if let Some(DebugCounter { some_block_label: Some(block_label), .. }) =
343-
counters.get(&id.into())
343+
counters.get(&id)
344344
{
345345
return if counter_format.id {
346346
format!("{}#{}", block_label, id.index())

src/librustdoc/passes/collect_intra_doc_links.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,15 +1012,14 @@ impl LinkCollector<'_, '_> {
10121012
} else {
10131013
// This is a bug.
10141014
debug!("attempting to resolve item without parent module: {}", path_str);
1015-
let err_kind = ResolutionFailure::NoParentItem.into();
10161015
resolution_failure(
10171016
self,
10181017
&item,
10191018
path_str,
10201019
disambiguator,
10211020
dox,
10221021
link_range,
1023-
smallvec![err_kind],
1022+
smallvec![ResolutionFailure::NoParentItem],
10241023
);
10251024
return None;
10261025
};

0 commit comments

Comments
 (0)