mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2024-11-05 15:26:24 +01:00
formatting things and pre commit hooks
This commit is contained in:
parent
daa551caa3
commit
b07eb248f1
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
.devenv/
|
.devenv/
|
||||||
.direnv/
|
.direnv/
|
||||||
/target
|
/target
|
||||||
|
.pre-commit-config.yaml
|
||||||
|
|
20
flake.nix
20
flake.nix
|
@ -25,13 +25,19 @@
|
||||||
default = devenv.lib.mkShell {
|
default = devenv.lib.mkShell {
|
||||||
inherit inputs pkgs;
|
inherit inputs pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
({pkgs, config, ...}: {
|
({pkgs, config, ...}: {
|
||||||
languages.rust = {
|
languages.rust = {
|
||||||
enable = true;
|
enable = true;
|
||||||
channel = "nightly";
|
channel = "nightly";
|
||||||
};
|
};
|
||||||
packages = [];
|
|
||||||
})
|
pre-commit.hooks = {
|
||||||
|
clippy.enable = true;
|
||||||
|
rustfmt.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
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