forked from katzen-cafe/iowo
formatting things and pre commit hooks
This commit is contained in:
parent
daa551caa3
commit
b07eb248f1
4 changed files with 17 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
.devenv/
|
.devenv/
|
||||||
.direnv/
|
.direnv/
|
||||||
/target
|
/target
|
||||||
|
.pre-commit-config.yaml
|
||||||
|
|
|
@ -30,6 +30,12 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
channel = "nightly";
|
channel = "nightly";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pre-commit.hooks = {
|
||||||
|
clippy.enable = true;
|
||||||
|
rustfmt.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
packages = [];
|
packages = [];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
use codespan_reporting::{
|
use codespan_reporting::{
|
||||||
diagnostic::{Diagnostic, Label},
|
diagnostic::{Diagnostic, Label},
|
||||||
files::SimpleFiles,
|
files::SimpleFiles,
|
||||||
|
|
|
@ -112,7 +112,9 @@ impl From<TypeDef<'_>> for InternalTypeDef {
|
||||||
match value {
|
match value {
|
||||||
TypeDef::Type(val) => Self::Single(TypeNamespaceId::Types(val.id)),
|
TypeDef::Type(val) => Self::Single(TypeNamespaceId::Types(val.id)),
|
||||||
TypeDef::Trait(val) => Self::Single(TypeNamespaceId::Traits(val.id)),
|
TypeDef::Trait(val) => Self::Single(TypeNamespaceId::Traits(val.id)),
|
||||||
TypeDef::List(list) => Self::List(list.into_iter().map(std::convert::Into::into).collect()),
|
TypeDef::List(list) => {
|
||||||
|
Self::List(list.into_iter().map(std::convert::Into::into).collect())
|
||||||
|
}
|
||||||
TypeDef::Record(rec) => Self::Record(
|
TypeDef::Record(rec) => Self::Record(
|
||||||
rec.into_iter()
|
rec.into_iter()
|
||||||
.map(|(name, typ)| (name, typ.into()))
|
.map(|(name, typ)| (name, typ.into()))
|
||||||
|
|
Loading…
Reference in a new issue