From f9eed8d61921073dd0352e45d4a9fcfcc6580489 Mon Sep 17 00:00:00 2001 From: blinxen Date: Mon, 27 Apr 2026 23:28:08 +0200 Subject: [PATCH] cargo fmt --- src/diff.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/diff.rs b/src/diff.rs index 4258e2d9..afc38ddf 100644 --- a/src/diff.rs +++ b/src/diff.rs @@ -44,9 +44,9 @@ pub fn get_git_diff(filename: &Path) -> Option { let filepath_absolute = filename.canonicalize().ok()?; let repository = gix::discover(filepath_absolute.parent().ok()?).ok()?; let repo_path_absolute = repository.workdir()?.canonicalize().ok()?; - let filepath_relative_to_repo = gix::path::to_unix_separators_on_windows( - gix::path::into_bstr(filepath_absolute.strip_prefix(&repo_path_absolute).ok()?) - ); + let filepath_relative_to_repo = gix::path::to_unix_separators_on_windows(gix::path::into_bstr( + filepath_absolute.strip_prefix(&repo_path_absolute).ok()?, + )); let index = repository.index_or_load_from_head_or_empty().ok()?; let index_entry = index.entry_by_path(filepath_relative_to_repo.as_ref())?; let mut cache = repository