clippy::complexity fixes
clone_on_copy useless_format bind_instead_of_map filter_map_identity useless_conversion map_flatten unnecessary_unwrap
This commit is contained in:
parent
8bf9c20765
commit
5fc8a8e227
11 changed files with 28 additions and 45 deletions
|
@ -462,7 +462,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
}
|
||||
};
|
||||
for elem in place_ref.projection[base..].iter() {
|
||||
cg_base = match elem.clone() {
|
||||
cg_base = match *elem {
|
||||
mir::ProjectionElem::Deref => {
|
||||
// a box with a non-zst allocator should not be directly dereferenced
|
||||
if cg_base.layout.ty.is_box() && !cg_base.layout.field(cx, 1).is_zst() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue