Skip to content

Commit

Permalink
update rusfmt toml, travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
boxtown committed May 22, 2018
1 parent 2db0d96 commit 18070a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 28 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -23,12 +23,18 @@ matrix:
- rust: nightly

before_script:
- rustup component add rustfmt-preview
# Configure only if we're doing coverage
- >
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
LOCAL="~/.local" && export PATH=$LOCAL/bin:$PATH;
fi
script:
- cargo fmt --all -- --check
- cargo build
- cargo test

after_success: >
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
wget https://github.com/SimonKagstrom/kcov/archive/v34.tar.gz &&
Expand Down
28 changes: 0 additions & 28 deletions rustfmt.toml
Expand Up @@ -2,31 +2,3 @@
# root of the src directory. You may still get some
# formatting errors (whitespace etc) which should be
# fixed manually before committing.

# Max line length that will be parsed by rustfmt
max_width = 160

# Organise imports in a consistant way
reorder_imports = true
reorder_imported_names = true
reorder_imports_in_group = true

# This can sometimes break when comments include line breaks
wrap_comments = true

# Visually align chained method calls on `.`
chain_indent = "Visual"
chain_one_line_max = 40

# Try to place function args on complete lines rather than
# as a vertical block
fn_args_density = "Compressed"

# Allow for compact formatting of struct literals
stuct_lit_width = 50
struct_variant_width = 50
struct_field_align_threshold = 20
struct_lit_multiline_style = "PreferSingle"

# Replace calls to the try! macro with ? syntax
use_try_shorthand = true

0 comments on commit 18070a2

Please sign in to comment.