mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
cargo clippy --fix
This commit is contained in:
parent
771c6c9271
commit
df2c7a6e4e
@ -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 {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user