@@ -14,7 +14,7 @@ declare_clippy_lint! {
1414 /// ### What it does
1515 /// Checks for multiple inherent implementations of a struct
1616 ///
17- /// The config option controls the scope at which multiple inherent impl blocks for the same
17+ /// The config option controls the scope in which multiple inherent ` impl` blocks for the same
1818 /// struct are linted, allowing values of `module` (only within the same module), `file`
1919 /// (within the same file), or `crate` (anywhere in the crate, default).
2020 ///
@@ -103,31 +103,31 @@ impl<'tcx> LateLintPass<'tcx> for MultipleInherentImpl {
103103 {
104104 Criterion :: File ( cx. tcx . sess . source_map ( ) . lookup_source_file ( span. lo ( ) ) . name . clone ( ) )
105105 } else {
106- // We know we are working on an Impl , so the the pattern matching can
106+ // We know we are working on an impl , so the pattern matching can
107107 // not fail
108108 unreachable ! ( )
109109 }
110110 } ,
111111 InherentImplLintScope :: Crate => Criterion :: Crate ,
112112 } ;
113- match type_map. entry ( ( impl_ty, criterion. clone ( ) ) ) {
113+ match type_map. entry ( ( impl_ty, criterion) ) {
114114 Entry :: Vacant ( e) => {
115115 // Store the id for the first impl block of this type. The span is retrieved lazily.
116- e. insert ( ( IdOrSpan :: Id ( impl_id) , criterion . clone ( ) ) ) ;
116+ e. insert ( IdOrSpan :: Id ( impl_id) ) ;
117117 } ,
118118 Entry :: Occupied ( mut e) => {
119119 if let Some ( span) = get_impl_span ( cx, impl_id) {
120- let first_span = match e. get ( ) . 0 {
120+ let first_span = match * e. get ( ) {
121121 IdOrSpan :: Span ( s) => s,
122122 IdOrSpan :: Id ( id) => {
123123 if let Some ( s) = get_impl_span ( cx, id) {
124124 // Remember the span of the first block.
125- * e. get_mut ( ) = ( IdOrSpan :: Span ( s) , criterion . clone ( ) ) ;
125+ * e. get_mut ( ) = IdOrSpan :: Span ( s) ;
126126 s
127127 } else {
128128 // The first impl block isn't considered by the lint. Replace it with the
129129 // current one.
130- * e. get_mut ( ) = ( IdOrSpan :: Span ( span) , criterion . clone ( ) ) ;
130+ * e. get_mut ( ) = IdOrSpan :: Span ( span) ;
131131 continue ;
132132 }
133133 } ,
0 commit comments