From 3715dc30a8f88fe24e2eb7ab80c657a13d52f40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Thu, 1 May 2025 17:56:30 +0200 Subject: [PATCH] style(rust): unbreak formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- .config/treefmt.nix | 5 +++-- src/fs/feature/git.rs | 2 +- src/options/mod.rs | 2 +- src/output/render/blocks.rs | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.config/treefmt.nix b/.config/treefmt.nix index 586b54c7..35bd5b15 100644 --- a/.config/treefmt.nix +++ b/.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" ]; }; diff --git a/src/fs/feature/git.rs b/src/fs/feature/git.rs index e4743f22..cef91264 100644 --- a/src/fs/feature/git.rs +++ b/src/fs/feature/git.rs @@ -388,7 +388,7 @@ fn current_branch(repo: &git2::Repository) -> Option { if e.code() == git2::ErrorCode::UnbornBranch || e.code() == git2::ErrorCode::NotFound => { - return None + return None; } Err(e) => { error!("Error looking up Git branch: {:?}", e); diff --git a/src/options/mod.rs b/src/options/mod.rs index 703e8a4d..1bfa7504 100644 --- a/src/options/mod.rs +++ b/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)?; diff --git a/src/output/render/blocks.rs b/src/output/render/blocks.rs index 5a9c3681..895566cd 100644 --- a/src/output/render/blocks.rs +++ b/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), };