diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | src/diff.rs | 3 | ||||
-rw-r--r-- | tests/tester.rs | 5 |
3 files changed, 4 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index b8b4b20d..6a38bfc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ matrix: # skip the global install step install: - cargo install --debug --force rustfmt-nightly - script: cargo fmt -- --write-mode=diff + script: cargo fmt -- --check addons: apt: diff --git a/src/diff.rs b/src/diff.rs index e6719a4e..ab315c91 100644 --- a/src/diff.rs +++ b/src/diff.rs @@ -23,7 +23,8 @@ pub fn get_git_diff(filename: &str) -> Option<LineChanges> { diff_options.pathspec(pathspec); diff_options.context_lines(0); - let diff = repo.diff_index_to_workdir(None, Some(&mut diff_options)) + let diff = repo + .diff_index_to_workdir(None, Some(&mut diff_options)) .ok()?; let mut line_changes: LineChanges = HashMap::new(); diff --git a/tests/tester.rs b/tests/tester.rs index 21a7829d..9865cbc1 100644 --- a/tests/tester.rs +++ b/tests/tester.rs @@ -29,10 +29,7 @@ impl BatTester { pub fn test_snapshot(&self, style: &str) { let output = Command::new(&self.exe) - .args(&[ - "tests/snapshots/sample.rs", - &format!("--style={}", style), - ]) + .args(&["tests/snapshots/sample.rs", &format!("--style={}", style)]) .output() .expect("bat failed"); // have to do the replace because the filename in the header changes based on the current working directory |