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

Commit f3ec5be

Browse files
committed
fix clippy::single_char_pattern: use char instead of string single-char pattern
1 parent 09e29e7 commit f3ec5be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_trait_selection/traits/error_reporting/suggestions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
495495
if let Ok(src) = self.tcx.sess.source_map().span_to_snippet(span) {
496496
// Don't care about `&mut` because `DerefMut` is used less
497497
// often and user will not expect autoderef happens.
498-
if src.starts_with("&") && !src.starts_with("&mut ") {
498+
if src.starts_with('&') && !src.starts_with("&mut ") {
499499
let derefs = "*".repeat(steps);
500500
err.span_suggestion(
501501
span,

0 commit comments

Comments
 (0)