Skip to content

Commit 39917a0

Browse files
committed
Fix clippy error
1 parent dda9869 commit 39917a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clippy_lints/src/redundant_clone.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,11 @@ fn find_stmt_assigns_to<'tcx>(
319319

320320
match (by_ref, &*rvalue) {
321321
(true, mir::Rvalue::Ref(_, _, place)) | (false, mir::Rvalue::Use(mir::Operand::Copy(place))) => {
322-
base_local_and_movability(cx, mir, *place)
322+
Some(base_local_and_movability(cx, mir, *place))
323323
},
324324
(false, mir::Rvalue::Ref(_, _, place)) => {
325325
if let [mir::ProjectionElem::Deref] = place.as_ref().projection {
326-
base_local_and_movability(cx, mir, *place)
326+
Some(base_local_and_movability(cx, mir, *place))
327327
} else {
328328
None
329329
}
@@ -340,7 +340,7 @@ fn base_local_and_movability<'tcx>(
340340
cx: &LateContext<'tcx>,
341341
mir: &mir::Body<'tcx>,
342342
place: mir::Place<'tcx>,
343-
) -> Option<(mir::Local, CannotMoveOut)> {
343+
) -> (mir::Local, CannotMoveOut) {
344344
use rustc_middle::mir::PlaceRef;
345345

346346
// Dereference. You cannot move things out from a borrowed value.
@@ -361,7 +361,7 @@ fn base_local_and_movability<'tcx>(
361361
&& !is_copy(cx, mir::Place::ty_from(local, projection, &mir.local_decls, cx.tcx).ty);
362362
}
363363

364-
Some((local, deref || field || slice))
364+
(local, deref || field || slice)
365365
}
366366

367367
struct LocalUseVisitor {

0 commit comments

Comments
 (0)