Skip to content

Commit 2a3d995

Browse files
committed
rename git_info to title
1 parent 4afc056 commit 2a3d995

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/info/info_field.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#[derive(Clone, clap::ValueEnum, Debug, Eq, PartialEq)]
22
pub enum InfoField {
3-
GitInfo,
3+
Title,
44
Project,
55
Head,
66
Pending,
@@ -20,7 +20,7 @@ pub enum InfoField {
2020

2121
#[derive(Default)]
2222
pub struct InfoFieldOff {
23-
pub git_info: bool,
23+
pub title: bool,
2424
pub project: bool,
2525
pub head: bool,
2626
pub pending: bool,
@@ -46,7 +46,7 @@ impl From<&Vec<InfoField>> for InfoFieldOff {
4646

4747
for field in fields_to_hide.iter() {
4848
match field {
49-
InfoField::GitInfo => info_field_off.git_info = true,
49+
InfoField::Title=> info_field_off.title= true,
5050
InfoField::Project => info_field_off.project = true,
5151
InfoField::Head => info_field_off.head = true,
5252
InfoField::Pending => info_field_off.pending = true,
@@ -78,7 +78,7 @@ mod test {
7878
let fields_to_hide = vec![InfoField::Version, InfoField::Repo];
7979
let info_field_off = InfoFieldOff::from(&fields_to_hide);
8080

81-
assert!(!info_field_off.git_info);
81+
assert!(!info_field_off.title);
8282
assert!(!info_field_off.project);
8383
assert!(!info_field_off.head);
8484
assert!(!info_field_off.pending);

src/info/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub struct Info {
5959

6060
impl std::fmt::Display for Info {
6161
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
62-
if !self.disabled_fields.git_info
62+
if !self.disabled_fields.title
6363
&& (!&self.git_username.is_empty() || !&self.git_version.is_empty())
6464
{
6565
let (git_info_field_str, git_info_field_len) = self.get_git_info_field();

0 commit comments

Comments
 (0)