diff --git a/.travis.yml b/.travis.yml index 8c91a74..4e65a66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,12 @@ rust: - stable - beta - nightly +before_script: + - rustup component add rustfmt-preview +script: + - cargo fmt all -- --check + - cargo build + - cargo test matrix: allow_failures: - rust: nightly diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..1aabd5c --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,17 @@ +indent_style = "Visual" +format_strings = true +format_macro_matchers = true +imports_layout = "HorizontalVertical" +merge_imports = true +match_block_trailing_comma = true +merge_derives = true +newline_style = "Unix" +normalize_comments = true +reorder_impl_items = true +space_after_colon = true +space_before_colon = false +struct_lit_single_line = false +type_punctuation_density = "Wide" +use_field_init_shorthand = true +use_try_shorthand = true +wrap_comments = true