Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 254ceae

Browse files
committed
call .as_deref() instead of .as_ref().map(Deref::deref) (clippy::option_as_ref_deref)
1 parent 1351db3 commit 254ceae

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/librustc_resolve/late/diagnostics.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,11 +1107,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
11071107
}
11081108
};
11091109

1110-
match (
1111-
lifetime_names.len(),
1112-
lifetime_names.iter().next(),
1113-
snippet.as_ref().map(|s| s.as_str()),
1114-
) {
1110+
match (lifetime_names.len(), lifetime_names.iter().next(), snippet.as_deref()) {
11151111
(1, Some(name), Some("&")) => {
11161112
suggest_existing(err, format!("&{} ", name));
11171113
}

0 commit comments

Comments
 (0)