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/
|
||||
.direnv/
|
||||
/target
|
||||
.pre-commit-config.yaml
|
||||
|
|
20
flake.nix
20
flake.nix
|
@ -25,13 +25,19 @@
|
|||
default = devenv.lib.mkShell {
|
||||
inherit inputs pkgs;
|
||||
modules = [
|
||||
({pkgs, config, ...}: {
|
||||
languages.rust = {
|
||||
enable = true;
|
||||
channel = "nightly";
|
||||
};
|
||||
packages = [];
|
||||
})
|
||||
({pkgs, config, ...}: {
|
||||
languages.rust = {
|
||||
enable = true;
|
||||
channel = "nightly";
|
||||
};
|
||||
|
||||
pre-commit.hooks = {
|
||||
clippy.enable = true;
|
||||
rustfmt.enable = true;
|
||||
};
|
||||
|
||||
packages = [];
|
||||
})
|
||||
];
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
use codespan_reporting::{
|
||||
diagnostic::{Diagnostic, Label},
|
||||
files::SimpleFiles,
|
||||
|
|
|
@ -112,7 +112,9 @@ 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(std::convert::Into::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…
Reference in a new issue