Skip to content

Commit 74e08a6

Browse files
committed
refactor: collapse match arm
1 parent 992801d commit 74e08a6

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

helix-vcs/src/git/blame.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use anyhow::Context as _;
22
use gix::bstr::BStr;
33
use helix_core::hashmap;
4-
use std::{collections::HashMap, path::Path};
4+
use std::path::Path;
55

66
use super::{get_repo_dir, open_repo};
77

@@ -77,16 +77,7 @@ impl BlameInformation {
7777
);
7878

7979
match variable_value {
80-
Variable::Valid(value) => {
81-
if exclude_content_after_variable {
82-
// don't push anything.
83-
exclude_content_after_variable = false;
84-
} else {
85-
formatted.push_str(&content_before_variable);
86-
}
87-
formatted.push_str(&value);
88-
}
89-
Variable::Invalid(value) => {
80+
Variable::Valid(value) | Variable::Invalid(value) => {
9081
if exclude_content_after_variable {
9182
// don't push anything.
9283
exclude_content_after_variable = false;

0 commit comments

Comments
 (0)