diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..d5075c8 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,10 @@ +chain_one_line_max = 100 +single_line_if_else_max_width = 100 +array_width = 100 +fn_call_width = 100 +reorder_import_names = true +reorder_imports_in_group = true +trailing_comma = "Never" +trailing_semicolon = true +fn_args_density = "CompressedIfEmpty" +imports_indent = "Visual" diff --git a/.travis.yml b/.travis.yml index 45656d9..4d0ab15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,13 @@ language: rust rust: - stable cache: cargo + +before_script: + - export PATH="$PATH:$HOME/.cargo/bin" + - which rustfmt || cargo install rustfmt + script: + - cargo fmt -- --write-mode=diff - cargo build - cargo build --release - cargo test