Skip to content

Commit

Permalink
cargo clippy --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Urhengulas committed Jan 31, 2024
1 parent 771c6c9 commit df2c7a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/hir-ty/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions crates/ide-db/src/imports/merge_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit df2c7a6

Please sign in to comment.