Przeglądaj źródła

style(rust): unbreak formatting

Signed-off-by: Christina Sørensen <ces@fem.gg>
Christina Sørensen 8 miesięcy temu
rodzic
commit
3715dc30a8

+ 3 - 2
.config/treefmt.nix

@@ -6,7 +6,8 @@
     nixfmt.enable = true; # nix
     statix.enable = true; # nix static analysis
     deadnix.enable = true; # find dead nix code
-    rustfmt.enable = true; # rust
+    # TODO https://github.com/numtide/treefmt-nix/issues/343
+    #rustfmt.enable = true; # rust
     shellcheck.enable = true; # bash/shell
     taplo.enable = true; # toml
     yamlfmt.enable = true; # yaml
@@ -20,7 +21,7 @@
         ];
         excludes = [ ".envrc" ];
       };
-      rustfmt.excludes = [ "src/options/flags.rs" ];
+      #rustfmt.excludes = [ "src/options/flags.rs" ];
       taplo.excludes = [ "tests/ptests/*.toml" ];
       yamlfmt.excludes = [ "./powertest.yaml" ];
     };

+ 1 - 1
src/fs/feature/git.rs

@@ -388,7 +388,7 @@ fn current_branch(repo: &git2::Repository) -> Option<String> {
             if e.code() == git2::ErrorCode::UnbornBranch
                 || e.code() == git2::ErrorCode::NotFound =>
         {
-            return None
+            return None;
         }
         Err(e) => {
             error!("Error looking up Git branch: {:?}", e);

+ 1 - 1
src/options/mod.rs

@@ -204,7 +204,7 @@ impl Options {
                 .is_some()
         {
             return Err(OptionsError::Unsupported(String::from(
-                "Options --git and --git-ignore can't be used because `git` feature was disabled in this build of exa"
+                "Options --git and --git-ignore can't be used because `git` feature was disabled in this build of exa",
             )));
         }
         let view = View::deduce(matches, vars)?;

+ 1 - 1
src/output/render/blocks.rs

@@ -45,7 +45,7 @@ impl f::Blocksize {
 
         let (prefix, n) = match result {
             NumberPrefix::Standalone(b) => {
-                return TextCell::paint(colours.blocksize(None), numerics.format_int(b))
+                return TextCell::paint(colours.blocksize(None), numerics.format_int(b));
             }
             NumberPrefix::Prefixed(p, n) => (p, n),
         };