@@ -191,19 +191,19 @@ impl<'cx, 'a> Context<'cx, 'a> {
191191 ///
192192 /// See [Self::manage_initial_capture] and [Self::manage_try_capture]
193193 fn manage_cond_expr ( & mut self , expr : & mut P < Expr > ) {
194- match ( * expr) . kind {
195- ExprKind :: AddrOf ( _, mutability, ref mut local_expr) => {
194+ match & mut expr. kind {
195+ ExprKind :: AddrOf ( _, mutability, local_expr) => {
196196 self . with_is_consumed_management (
197197 matches ! ( mutability, Mutability :: Mut ) ,
198198 |this| this. manage_cond_expr ( local_expr)
199199 ) ;
200200 }
201- ExprKind :: Array ( ref mut local_exprs) => {
201+ ExprKind :: Array ( local_exprs) => {
202202 for local_expr in local_exprs {
203203 self . manage_cond_expr ( local_expr) ;
204204 }
205205 }
206- ExprKind :: Binary ( ref op, ref mut lhs, ref mut rhs) => {
206+ ExprKind :: Binary ( op, lhs, rhs) => {
207207 self . with_is_consumed_management (
208208 matches ! (
209209 op. node,
@@ -226,56 +226,56 @@ impl<'cx, 'a> Context<'cx, 'a> {
226226 }
227227 ) ;
228228 }
229- ExprKind :: Call ( _, ref mut local_exprs) => {
229+ ExprKind :: Call ( _, local_exprs) => {
230230 for local_expr in local_exprs {
231231 self . manage_cond_expr ( local_expr) ;
232232 }
233233 }
234- ExprKind :: Cast ( ref mut local_expr, _) => {
234+ ExprKind :: Cast ( local_expr, _) => {
235235 self . manage_cond_expr ( local_expr) ;
236236 }
237- ExprKind :: Index ( ref mut prefix, ref mut suffix) => {
237+ ExprKind :: Index ( prefix, suffix) => {
238238 self . manage_cond_expr ( prefix) ;
239239 self . manage_cond_expr ( suffix) ;
240240 }
241- ExprKind :: MethodCall ( ref mut call) => {
242- for arg in call. args . iter_mut ( ) {
241+ ExprKind :: MethodCall ( call) => {
242+ for arg in & mut call. args {
243243 self . manage_cond_expr ( arg) ;
244244 }
245245 }
246- ExprKind :: Path ( _, Path { ref segments, .. } ) if let & [ ref path_segment] = & segments[ ..] => {
246+ ExprKind :: Path ( _, Path { segments, .. } ) if let [ path_segment] = & segments[ ..] => {
247247 let path_ident = path_segment. ident ;
248248 self . manage_initial_capture ( expr, path_ident) ;
249249 }
250- ExprKind :: Paren ( ref mut local_expr) => {
250+ ExprKind :: Paren ( local_expr) => {
251251 self . manage_cond_expr ( local_expr) ;
252252 }
253- ExprKind :: Range ( ref mut prefix, ref mut suffix, _) => {
254- if let Some ( ref mut elem) = prefix {
253+ ExprKind :: Range ( prefix, suffix, _) => {
254+ if let Some ( elem) = prefix {
255255 self . manage_cond_expr ( elem) ;
256256 }
257- if let Some ( ref mut elem) = suffix {
257+ if let Some ( elem) = suffix {
258258 self . manage_cond_expr ( elem) ;
259259 }
260260 }
261- ExprKind :: Repeat ( ref mut local_expr, ref mut elem) => {
261+ ExprKind :: Repeat ( local_expr, elem) => {
262262 self . manage_cond_expr ( local_expr) ;
263263 self . manage_cond_expr ( & mut elem. value ) ;
264264 }
265- ExprKind :: Struct ( ref mut elem) => {
265+ ExprKind :: Struct ( elem) => {
266266 for field in & mut elem. fields {
267267 self . manage_cond_expr ( & mut field. expr ) ;
268268 }
269- if let StructRest :: Base ( ref mut local_expr) = elem. rest {
269+ if let StructRest :: Base ( local_expr) = & mut elem. rest {
270270 self . manage_cond_expr ( local_expr) ;
271271 }
272272 }
273- ExprKind :: Tup ( ref mut local_exprs) => {
273+ ExprKind :: Tup ( local_exprs) => {
274274 for local_expr in local_exprs {
275275 self . manage_cond_expr ( local_expr) ;
276276 }
277277 }
278- ExprKind :: Unary ( un_op, ref mut local_expr) => {
278+ ExprKind :: Unary ( un_op, local_expr) => {
279279 self . with_is_consumed_management (
280280 matches ! ( un_op, UnOp :: Neg | UnOp :: Not ) ,
281281 |this| this. manage_cond_expr ( local_expr)
0 commit comments