Repository: sharkdp/fd (language: rust)

Issue:
fd-find tests fail after latest ignore update
```
failures:
---- test_absolute_path stdout ----
	thread 'test_absolute_path' panicked at '`fd --absolute-path` did not produce the expected output.
Showing diff between expected and actual:
 /tmp/fd-tests.DwcppfrEJ0P1/a.foo
 /tmp/fd-tests.DwcppfrEJ0P1/e1 e2
+/tmp/fd-tests.DwcppfrEJ0P1/gitignored.foo
 /tmp/fd-tests.DwcppfrEJ0P1/one
 /tmp/fd-tests.DwcppfrEJ0P1/one/b.foo
 /tmp/fd-tests.DwcppfrEJ0P1/one/two
 /tmp/fd-tests.DwcppfrEJ0P1/one/two/C.Foo2
 /tmp/fd-tests.DwcppfrEJ0P1/one/two/c.foo
 /tmp/fd-tests.DwcppfrEJ0P1/one/two/three
 /tmp/fd-tests.DwcppfrEJ0P1/one/two/three/d.foo
 /tmp/fd-tests.DwcppfrEJ0P1/one/two/three/directory_foo
 /tmp/fd-tests.DwcppfrEJ0P1/symlink
', tests/testenv/mod.rs:191:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- test_custom_ignore_files stdout ----
	thread 'test_custom_ignore_files' panicked at '`fd --ignore-file custom.ignore foo` did not produce the expected output.
Showing diff between expected and actual:
 a.foo
+gitignored.foo
 one/b.foo
 one/two/c.foo
', tests/testenv/mod.rs:191:13
---- test_exec stdout ----
	thread 'test_exec' panicked at '`fd --absolute-path foo --exec echo` did not produce the expected output.
Showing diff between expected and actual:
 /tmp/fd-tests.Sez4i2GSSiuY/a.foo
+/tmp/fd-tests.Sez4i2GSSiuY/gitignored.foo
 /tmp/fd-tests.Sez4i2GSSiuY/one/b.foo
 /tmp/fd-tests.Sez4i2GSSiuY/one/two/C.Foo2
 /tmp/fd-tests.Sez4i2GSSiuY/one/two/c.foo
 /tmp/fd-tests.Sez4i2GSSiuY/one/two/three/d.foo
 /tmp/fd-tests.Sez4i2GSSiuY/one/two/three/directory_foo
', tests/testenv/mod.rs:191:13
---- test_exec_short_arg stdout ----
	thread 'test_exec_short_arg' panicked at '`fd --absolute-path foo -x echo` did not produce the expected output.
Showing diff between expected and actual:
 /tmp/fd-tests.kpFXl4fIdK3t/a.foo
+/tmp/fd-tests.kpFXl4fIdK3t/gitignored.foo
 /tmp/fd-tests.kpFXl4fIdK3t/one/b.foo
 /tmp/fd-tests.kpFXl4fIdK3t/one/two/C.Foo2
 /tmp/fd-tests.kpFXl4fIdK3t/one/two/c.foo
 /tmp/fd-tests.kpFXl4fIdK3t/one/two/three/d.foo
 /tmp/fd-tests.kpFXl4fIdK3t/one/two/three/directory_foo
', tests/testenv/mod.rs:191:13
---- test_exec_substitution stdout ----
	thread 'test_exec_substitution' panicked at '`fd --absolute-path foo -exec echo` did not produce the expected output.
Showing diff between expected and actual:
 /tmp/fd-tests.8Fu2l6tEdLly/a.foo
+/tmp/fd-tests.8Fu2l6tEdLly/gitignored.foo
 /tmp/fd-tests.8Fu2l6tEdLly/one/b.foo
 /tmp/fd-tests.8Fu2l6tEdLly/one/two/C.Foo2
 /tmp/fd-tests.8Fu2l6tEdLly/one/two/c.foo
 /tmp/fd-tests.8Fu2l6tEdLly/one/two/three/d.foo
 /tmp/fd-tests.8Fu2l6tEdLly/one/two/three/directory_foo
', tests/testenv/mod.rs:191:13
---- test_extension stdout ----
	thread 'test_extension' panicked at '`fd --extension foo` did not produce the expected output.
Showing diff between expected and actual:
 a.foo
+gitignored.foo
 one/b.foo
 one/two/c.foo
 one/two/three/d.foo
', tests/testenv/mod.rs:191:13
---- test_excludes stdout ----
	thread 'test_excludes' panicked at '`fd --exclude one/two foo` did not produce the expected output.
Showing diff between expected and actual:
 a.foo
+gitignored.foo
 one/b.foo
', tests/testenv/mod.rs:191:13
---- test_hidden stdout ----
	thread 'test_hidden' panicked at '`fd --hidden foo` did not produce the expected output.
Showing diff between expected and actual:
 .hidden.foo
 a.foo
+gitignored.foo
 one/b.foo
 one/two/C.Foo2
 one/two/c.foo
 one/two/three/d.foo
 one/two/three/directory_foo
', tests/testenv/mod.rs:191:13
---- test_gitignore_and_fdignore stdout ----
	thread 'test_gitignore_and_fdignore' panicked at '`fd ignored` did not produce the expected output.
Showing diff between expected and actual:
+ignored-by-gitignore
 ignored-by-nothing
', tests/testenv/mod.rs:191:13
---- test_explicit_root_path stdout ----
	thread 'test_explicit_root_path' panicked at '`fd foo ../../` did not produce the expected output.
Showing diff between expected and actual:
 ../../a.foo
+../../gitignored.foo
 ../../one/b.foo
 ../../one/two/C.Foo2
 ../../one/two/c.foo
 ../../one/two/three/d.foo
 ../../one/two/three/directory_foo
', tests/testenv/mod.rs:191:13
---- test_implicit_absolute_path stdout ----
	thread 'test_implicit_absolute_path' panicked at '`fd foo /tmp/fd-tests.78rxLc7OIJa8` did not produce the expected output.
Showing diff between expected and actual:
 /tmp/fd-tests.78rxLc7OIJa8/a.foo
+/tmp/fd-tests.78rxLc7OIJa8/gitignored.foo
 /tmp/fd-tests.78rxLc7OIJa8/one/b.foo
 /tmp/fd-tests.78rxLc7OIJa8/one/two/C.Foo2
 /tmp/fd-tests.78rxLc7OIJa8/one/two/c.foo
 /tmp/fd-tests.78rxLc7OIJa8/one/two/three/d.foo
 /tmp/fd-tests.78rxLc7OIJa8/one/two/three/directory_foo
', tests/testenv/mod.rs:191:13
---- test_max_depth stdout ----
	thread 'test_max_depth' panicked at '`fd --max-depth 3` did not produce the expected output.
Showing diff between expected and actual:
 a.foo
 e1 e2
+gitignored.foo
 one
 one/b.foo
 one/two
 one/two/C.Foo2
 one/two/c.foo
 one/two/three
 symlink
', tests/testenv/mod.rs:191:13
---- test_normalized_absolute_path stdout ----
	thread 'test_normalized_absolute_path' panicked at '`fd --absolute-path foo ..` did not produce the expected output.
Showing diff between expected and actual:
 /tmp/fd-tests.lr9WAAeSTxZI/a.foo
+/tmp/fd-tests.lr9WAAeSTxZI/gitignored.foo
 /tmp/fd-tests.lr9WAAeSTxZI/one/b.foo
 /tmp/fd-tests.lr9WAAeSTxZI/one/two/C.Foo2
 /tmp/fd-tests.lr9WAAeSTxZI/one/two/c.foo
 /tmp/fd-tests.lr9WAAeSTxZI/one/two/three/d.foo
 /tmp/fd-tests.lr9WAAeSTxZI/one/two/three/directory_foo
', tests/testenv/mod.rs:191:13
---- test_print0 stdout ----
	thread 'test_print0' panicked at '`fd --print0 foo` did not produce the expected output.
Showing diff between expected and actual:
 a.fooNULL
+gitignored.fooNULL
 one/b.fooNULL
 one/two/C.Foo2NULL
 one/two/c.fooNULL
 one/two/three/d.fooNULL
 one/two/three/directory_fooNULL
', tests/testenv/mod.rs:191:13
---- test_simple stdout ----
	thread 'test_simple' panicked at '`fd d.foo` did not produce the expected output.
Showing diff between expected and actual:
+gitignored.foo
 one/two/three/d.foo
', tests/testenv/mod.rs:191:13
---- test_symlink_as_root stdout ----
	thread 'test_symlink_as_root' panicked at '`fd  ../..` did not produce the expected output.
Showing diff between expected and actual:
 ../../a.foo
 ../../e1 e2
+../../gitignored.foo
 ../../one
 ../../one/b.foo
 ../../one/two
 ../../one/two/C.Foo2
 ../../one/two/c.foo
 ../../one/two/three
 ../../one/two/three/d.foo
 ../../one/two/three/directory_foo
 ../../symlink
', tests/testenv/mod.rs:191:13
---- test_type stdout ----
	thread 'test_type' panicked at '`fd --type f` did not produce the expected output.
Showing diff between expected and actual:
 a.foo
 e1 e2
+gitignored.foo
 one/b.foo
 one/two/C.Foo2
 one/two/c.foo
 one/two/three/d.foo
', tests/testenv/mod.rs:191:13
failures:
    test_absolute_path
    test_custom_ignore_files
    test_excludes
    test_exec
    test_exec_short_arg
    test_exec_substitution
    test_explicit_root_path
    test_extension
    test_gitignore_and_fdignore
    test_hidden
    test_implicit_absolute_path
    test_max_depth
    test_normalized_absolute_path
    test_print0
    test_simple
    test_symlink_as_root
    test_type
test result: FAILED. 18 passed; 17 failed; 0 ignored; 0 measured; 0 filtered out
```

I think now `ignore` ignores rules until you have `.git` directory. Right, @BurntSushi?


Discussion / hints:
Yes. The latest update to `ignore` fixes a bug where `.gitignore` would be respected, even outside git repositories.

If you run the tests within a git repository, then you may not notice these failures. In case it's useful to you, I recently [changed ripgrep's test suite](https://github.com/BurntSushi/ripgrep/pull/998) to run tests inside `/tmp`, which reduces (although not completely eliminates) the effects of state imposed by different dev environments.

Fix patch:
diff --git a/Cargo.lock b/Cargo.lock
index 330df2a96..dcf4d767d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
 [[package]]
 name = "aho-corasick"
-version = "0.6.4"
+version = "0.6.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -11,47 +11,47 @@ name = "ansi_term"
 version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "atty"
-version = "0.2.10"
+version = "0.2.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
  "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bitflags"
-version = "0.9.1"
+version = "1.0.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
-name = "bitflags"
-version = "1.0.3"
+name = "cc"
+version = "1.0.18"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "cfg-if"
-version = "0.1.3"
+version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "clap"
-version = "2.31.2"
+version = "2.32.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -61,12 +61,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "ctrlc"
-version = "3.1.0"
+version = "3.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -79,20 +78,20 @@ name = "fd-find"
 version = "7.0.0"
 dependencies = [
  "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "ctrlc 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "ignore 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ignore 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -116,31 +115,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "globset"
-version = "0.4.0"
+version = "0.4.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "ignore"
-version = "0.4.2"
+version = "0.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "globset 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "globset 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -154,20 +153,20 @@ dependencies = [
 
 [[package]]
 name = "lazy_static"
-version = "1.0.0"
+version = "1.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "libc"
-version = "0.2.40"
+version = "0.2.42"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "log"
-version = "0.4.1"
+version = "0.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -175,17 +174,18 @@ name = "memchr"
 version = "2.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "nix"
-version = "0.9.0"
+version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
  "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -194,7 +194,7 @@ name = "num_cpus"
 version = "1.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -203,13 +203,13 @@ version = "0.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "redox_syscall"
-version = "0.1.37"
+version = "0.1.40"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -217,44 +217,24 @@ name = "redox_termios"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "regex"
-version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "regex"
-version = "1.0.0"
+version = "1.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "regex-syntax"
-version = "0.5.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.6.0"
+version = "0.6.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -265,7 +245,7 @@ name = "remove_dir_all"
 version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -273,7 +253,7 @@ name = "same-file"
 version = "1.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -296,7 +276,7 @@ version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -305,18 +285,18 @@ name = "termion"
 version = "1.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
  "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "textwrap"
-version = "0.9.0"
+version = "0.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -324,7 +304,7 @@ name = "thread_local"
 version = "0.3.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -335,7 +315,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "unicode-width"
-version = "0.1.4"
+version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -353,12 +333,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "vec_map"
-version = "0.8.0"
+version = "0.8.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "version_check"
-version = "0.1.3"
+version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -372,7 +352,7 @@ version = "2.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -382,7 +362,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "winapi"
-version = "0.3.4"
+version = "0.3.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -405,53 +385,51 @@ version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [metadata]
-"checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4"
+"checksum aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c6d463cbe7ed28720b5b489e7c083eeb8f90d08be2a0d6bb9e1ffea9ce1afa"
 "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
-"checksum atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4a1aa4c24c0718a250f0681885c1af91419d242f29eb8f2ab28502d80dbd1"
-"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
+"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
 "checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789"
-"checksum cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "405216fd8fe65f718daa7102ea808a946b6ce40c742998fbfd3463645552de18"
-"checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536"
+"checksum cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "2119ea4867bd2b8ed3aecab467709720b2d55b1bcfe09f772fd68066eaf15275"
+"checksum cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efe5c877e17a9c717a0bf3613b2709f723202c4e4675cc8f12926ded29bcb17e"
+"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e"
 "checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19"
-"checksum ctrlc 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "653abc99aa905f693d89df4797fadc08085baee379db92be9f2496cefe8a6f2c"
+"checksum ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "630391922b1b893692c6334369ff528dcc3a9d8061ccf4c803aa8f83cb13db5e"
 "checksum diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3c2b69f912779fbb121ceb775d74d51e915af17aaebc38d28a592843a2dd0a3a"
 "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
 "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
 "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
-"checksum globset 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "142754da2c9b3722affd909f9e27f2a6700a7a303f362971e0a74c652005a43d"
-"checksum ignore 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "787a5940ab88e0f2f3b2cad3687060bddcf67520f3b761abc31065c9c495d088"
+"checksum globset 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8e49edbcc9c7fc5beb8c0a54e7319ff8bed353a2b55e85811c6281188c2a6c84"
+"checksum ignore 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3e9faa7c84064f07b40da27044af629f578bc7994b650d3e458d0c29183c1d91"
 "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
-"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
-"checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b"
-"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2"
+"checksum lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fb497c35d362b6a331cfd94956a07fc2c78a4604cdbee844a81170386b996dd3"
+"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1"
+"checksum log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "61bd98ae7f7b754bc53dca7d44b604f733c6bba044ea6f41bc8d89272d8161d2"
 "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
-"checksum nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2c5afeb0198ec7be8569d666644b574345aad2e95a53baf3a532da3e0f3fb32"
+"checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17"
 "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30"
 "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
-"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd"
+"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
 "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
-"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384"
-"checksum regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75ecf88252dce580404a22444fc7d626c01815debba56a7f4f536772a5ff19d3"
-"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7"
-"checksum regex-syntax 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1ac0f60d675cc6cf13a20ec076568254472551051ad5dd050364d70671bf6b"
+"checksum regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5bbbea44c5490a1e84357ff28b7d518b4619a159fed5d25f6c1de2d19cc42814"
+"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d"
 "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
 "checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637"
 "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
 "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
 "checksum term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e5b9a66db815dcfd2da92db471106457082577c3c278d4138ab3e3b4e189327"
 "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
-"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693"
+"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6"
 "checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963"
 "checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
-"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
+"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
 "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
 "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
-"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c"
-"checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d"
+"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
+"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051"
 "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
 "checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369"
 "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
-"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3"
+"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd"
 "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
 "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
 "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
diff --git a/src/app.rs b/src/app.rs
index 3ed405902..e79e2a189 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -50,26 +50,22 @@ pub fn build_app() -> App<'static, 'static> {
                 .short("u")
                 .multiple(true)
                 .hidden(true),
-        )
-        .arg(
+        ).arg(
             arg("case-sensitive")
                 .long("case-sensitive")
                 .short("s")
                 .overrides_with("ignore-case"),
-        )
-        .arg(
+        ).arg(
             arg("ignore-case")
                 .long("ignore-case")
                 .short("i")
                 .overrides_with("case-sensitive"),
-        )
-        .arg(
+        ).arg(
             arg("fixed-strings")
                 .long("fixed-strings")
                 .short("F")
                 .alias("literal"),
-        )
-        .arg(arg("absolute-path").long("absolute-path").short("a"))
+        ).arg(arg("absolute-path").long("absolute-path").short("a"))
         .arg(arg("follow").long("follow").short("L").alias("dereference"))
         .arg(arg("full-path").long("full-path").short("p"))
         .arg(arg("null_separator").long("print0").short("0"))
@@ -91,10 +87,8 @@ pub fn build_app() -> App<'static, 'static> {
                     "symlink",
                     "x",
                     "executable",
-                ])
-                .hide_possible_values(true),
-        )
-        .arg(
+                ]).hide_possible_values(true),
+        ).arg(
             arg("extension")
                 .long("extension")
                 .short("e")
@@ -102,8 +96,7 @@ pub fn build_app() -> App<'static, 'static> {
                 .number_of_values(1)
                 .takes_value(true)
                 .value_name("ext"),
-        )
-        .arg(
+        ).arg(
             arg("exec")
                 .long("exec")
                 .short("x")
@@ -111,8 +104,7 @@ pub fn build_app() -> App<'static, 'static> {
                 .allow_hyphen_values(true)
                 .value_terminator(";")
                 .value_name("cmd"),
-        )
-        .arg(
+        ).arg(
             arg("exclude")
                 .long("exclude")
                 .short("E")
@@ -120,16 +112,14 @@ pub fn build_app() -> App<'static, 'static> {
                 .value_name("pattern")
                 .number_of_values(1)
                 .multiple(true),
-        )
-        .arg(
+        ).arg(
             arg("ignore-file")
                 .long("ignore-file")
                 .takes_value(true)
                 .value_name("path")
                 .number_of_values(1)
                 .multiple(true),
-        )
-        .arg(
+        ).arg(
             arg("color")
                 .long("color")
                 .short("c")
@@ -137,15 +127,13 @@ pub fn build_app() -> App<'static, 'static> {
                 .value_name("when")
                 .possible_values(&["never", "auto", "always"])
                 .hide_possible_values(true),
-        )
-        .arg(
+        ).arg(
             arg("threads")
                 .long("threads")
                 .short("j")
                 .takes_value(true)
                 .value_name("num"),
-        )
-        .arg(
+        ).arg(
             arg("size")
                 .long("size")
                 .short("S")
@@ -153,14 +141,12 @@ pub fn build_app() -> App<'static, 'static> {
                 .number_of_values(1)
                 .allow_hyphen_values(true)
                 .multiple(true),
-        )
-        .arg(
+        ).arg(
             arg("max-buffer-time")
                 .long("max-buffer-time")
                 .takes_value(true)
                 .hidden(true),
-        )
-        .arg(arg("pattern"))
+        ).arg(arg("pattern"))
         .arg(arg("path").multiple(true))
 }
 
diff --git a/src/main.rs b/src/main.rs
index 8e11b6cd0..9f2c4a170 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -67,8 +67,7 @@ fn main() {
                     ));
                 }
                 path_buffer
-            })
-            .collect::<Vec<_>>(),
+            }).collect::<Vec<_>>(),
         None => vec![current_dir.to_path_buf()],
     };
 
@@ -80,8 +79,7 @@ fn main() {
                     .canonicalize()
                     .and_then(|pb| fshelper::absolute_path(pb.as_path()))
                     .unwrap()
-            })
-            .collect();
+            }).collect();
     }
 
     // Detect if the user accidentally supplied a path instead of a search pattern
@@ -144,8 +142,7 @@ fn main() {
                 }
                 error(&format!("Error: {} is not a valid size constraint.", sf));
             }).collect()
-        })
-        .unwrap_or_else(|| vec![]);
+        }).unwrap_or_else(|| vec![]);
 
     let config = FdOptions {
         case_sensitive,


Test patch:
diff --git a/tests/testenv/mod.rs b/tests/testenv/mod.rs
index 370cb6469..7cea96bc0 100644
--- a/tests/testenv/mod.rs
+++ b/tests/testenv/mod.rs
@@ -44,6 +44,9 @@ fn create_working_directory(
     {
         let root = temp_dir.path();
 
+        // Pretend that this is a Git repository in order for `.gitignore` files to be respected
+        fs::create_dir_all(root.join(".git"))?;
+
         for directory in directories {
             fs::create_dir_all(root.join(directory))?;
         }
@@ -103,8 +106,7 @@ fn format_output_error(args: &[&str], expected: &str, actual: &str) -> String {
             diff::Result::Left(l) => format!("-{}", l),
             diff::Result::Both(l, _) => format!(" {}", l),
             diff::Result::Right(r) => format!("+{}", r),
-        })
-        .collect::<Vec<_>>()
+        }).collect::<Vec<_>>()
         .join("\n");
 
     format!(
@@ -124,11 +126,9 @@ fn normalize_output(s: &str, trim_left: bool) -> String {
         .replace('\0', "NULL\n")
         .lines()
         .map(|line| {
-            let line =
-                if trim_left { line.trim_left() } else { line };
+            let line = if trim_left { line.trim_left() } else { line };
             line.replace('/', &std::path::MAIN_SEPARATOR.to_string())
-        })
-        .collect::<Vec<_>>();
+        }).collect::<Vec<_>>();
 
     lines.sort_by_key(|s| s.clone());