fix/allow clippy errors

This commit is contained in:
Schrottkatze 2023-11-20 10:27:47 +01:00
parent 55acd88f0a
commit 8c52d3668e
9 changed files with 51 additions and 30 deletions

View file

@ -20,8 +20,14 @@ impl<'a> TypeDef<'a> {
match def {
InternalTypeDef::Single(id) => match id {
// safe to unwrap because this is only used with internal representations
TypeNamespaceId::Types(id) => TypeDef::Type(ns.get_type(*id).unwrap()),
TypeNamespaceId::Traits(id) => TypeDef::Trait(ns.get_trait(*id).unwrap()),
TypeNamespaceId::Types(id) => TypeDef::Type(
ns.get_type(*id)
.expect("Incorrect internal type id. This is a bug."),
),
TypeNamespaceId::Traits(id) => TypeDef::Trait(
ns.get_trait(*id)
.expect("Incorrect internal trait id. This is a bug."),
),
},
InternalTypeDef::List(list) => TypeDef::List(
list.into_iter()