clippy::useless_conversion
This commit is contained in:
parent
5a2dd7d4f3
commit
6d064295c8
13 changed files with 20 additions and 28 deletions
|
@ -3475,7 +3475,7 @@ impl From<ForeignItemKind> for ItemKind {
|
|||
fn from(foreign_item_kind: ForeignItemKind) -> ItemKind {
|
||||
match foreign_item_kind {
|
||||
ForeignItemKind::Static(box static_foreign_item) => {
|
||||
ItemKind::Static(Box::new(static_foreign_item.into()))
|
||||
ItemKind::Static(Box::new(static_foreign_item))
|
||||
}
|
||||
ForeignItemKind::Fn(fn_kind) => ItemKind::Fn(fn_kind),
|
||||
ForeignItemKind::TyAlias(ty_alias_kind) => ItemKind::TyAlias(ty_alias_kind),
|
||||
|
@ -3489,9 +3489,7 @@ impl TryFrom<ItemKind> for ForeignItemKind {
|
|||
|
||||
fn try_from(item_kind: ItemKind) -> Result<ForeignItemKind, ItemKind> {
|
||||
Ok(match item_kind {
|
||||
ItemKind::Static(box static_item) => {
|
||||
ForeignItemKind::Static(Box::new(static_item.into()))
|
||||
}
|
||||
ItemKind::Static(box static_item) => ForeignItemKind::Static(Box::new(static_item)),
|
||||
ItemKind::Fn(fn_kind) => ForeignItemKind::Fn(fn_kind),
|
||||
ItemKind::TyAlias(ty_alias_kind) => ForeignItemKind::TyAlias(ty_alias_kind),
|
||||
ItemKind::MacCall(a) => ForeignItemKind::MacCall(a),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue