cargo clippy --fix

This commit is contained in:
Johann Hemmann 2024-01-31 16:29:50 +01:00
parent 771c6c9271
commit df2c7a6e4e
2 changed files with 2 additions and 3 deletions

View File

@ -440,7 +440,7 @@ pub(crate) fn detect_variant_from_bytes<'a>(
(db.enum_data(e).variants[index.0].0, layout)
}
hir_def::layout::Variants::Multiple { tag, tag_encoding, variants, .. } => {
let size = tag.size(&*target_data_layout).bytes_usize();
let size = tag.size(target_data_layout).bytes_usize();
let offset = layout.fields.offset(0).bytes_usize(); // The only field on enum variants is the tag field
let tag = i128::from_le_bytes(pad16(&b[offset..offset + size], false));
match tag_encoding {

View File

@ -467,8 +467,7 @@ fn recursive_normalize(use_tree: &ast::UseTree, style: NormalizationStyle) -> Op
}
ted::replace_all(start..=end, elements);
} else {
let new_use_tree_list =
make::use_tree_list(subtrees.into_iter()).clone_for_update();
let new_use_tree_list = make::use_tree_list(subtrees).clone_for_update();
ted::replace(use_tree_list.syntax(), new_use_tree_list.syntax());
}
modified = true;