Skip to content

Commit 755b320

Browse files
committed
simplified conditional
1 parent 96fd218 commit 755b320

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustc_mir/borrow_check/error_reporting.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
133133
let is_partial_move = move_site_vec.iter().any(|move_site| {
134134
let move_out = self.move_data.moves[(*move_site).moi];
135135
let moved_place = &self.move_data.move_paths[move_out.path].place;
136-
if used_place != moved_place {
137-
used_place.is_prefix_of(moved_place)
138-
} else { false }
136+
used_place != moved_place && used_place.is_prefix_of(moved_place)
139137
});
140138
for move_site in &move_site_vec {
141139
let move_out = self.move_data.moves[(*move_site).moi];

0 commit comments

Comments
 (0)