run cargo clippy --fix
This commit is contained in:
parent
8c52d3668e
commit
a896e66cca
7 changed files with 30 additions and 33 deletions
|
@ -94,8 +94,8 @@ impl GlobalNamespace {
|
|||
} else {
|
||||
self.commands.borrow_mut().push(InternalCommand {
|
||||
name: name.to_owned(),
|
||||
input: input.map(|def| def.into()),
|
||||
output: output.map(|def| def.into()),
|
||||
input: input.map(std::convert::Into::into),
|
||||
output: output.map(std::convert::Into::into),
|
||||
});
|
||||
let id = self.traits.borrow().len() - 1;
|
||||
let _ = self
|
||||
|
|
|
@ -30,12 +30,12 @@ impl<'a> TypeDef<'a> {
|
|||
),
|
||||
},
|
||||
InternalTypeDef::List(list) => TypeDef::List(
|
||||
list.into_iter()
|
||||
list.iter()
|
||||
.map(|def| Self::from_internal(ns, def))
|
||||
.collect(),
|
||||
),
|
||||
InternalTypeDef::Record(rec) => TypeDef::Record(
|
||||
rec.into_iter()
|
||||
rec.iter()
|
||||
.map(|(name, def)| (name.clone(), Self::from_internal(ns, def)))
|
||||
.collect(),
|
||||
),
|
||||
|
@ -112,7 +112,7 @@ impl From<TypeDef<'_>> for InternalTypeDef {
|
|||
match value {
|
||||
TypeDef::Type(val) => Self::Single(TypeNamespaceId::Types(val.id)),
|
||||
TypeDef::Trait(val) => Self::Single(TypeNamespaceId::Traits(val.id)),
|
||||
TypeDef::List(list) => Self::List(list.into_iter().map(|def| def.into()).collect()),
|
||||
TypeDef::List(list) => Self::List(list.into_iter().map(std::convert::Into::into).collect()),
|
||||
TypeDef::Record(rec) => Self::Record(
|
||||
rec.into_iter()
|
||||
.map(|(name, typ)| (name, typ.into()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue