From 6001593a0a1c4a7be1f83574341f4e8ef03e7af5 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Fri, 3 Apr 2020 16:26:05 +0200 Subject: [PATCH] rename --- src/app.rs | 10 +++++----- src/components/changes.rs | 8 ++++---- src/components/command.rs | 2 +- src/components/commit.rs | 6 +++--- src/components/diff.rs | 2 +- src/components/help.rs | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/app.rs b/src/app.rs index deb9d9b4..b385658a 100644 --- a/src/app.rs +++ b/src/app.rs @@ -273,7 +273,7 @@ impl App { let focus_on_stage = self.focus == Focus::Stage; let focus_not_diff = self.focus != Focus::Diff; res.push( - CommandInfo::new_new( + CommandInfo::new( commands::STATUS_FOCUS_UNSTAGED, true, main_cmds_available @@ -283,7 +283,7 @@ impl App { .hidden(), ); res.push( - CommandInfo::new_new( + CommandInfo::new( commands::STATUS_FOCUS_STAGED, true, main_cmds_available @@ -295,12 +295,12 @@ impl App { } { let focus_on_diff = self.focus == Focus::Diff; - res.push(CommandInfo::new_new( + res.push(CommandInfo::new( commands::STATUS_FOCUS_LEFT, true, main_cmds_available && focus_on_diff, )); - res.push(CommandInfo::new_new( + res.push(CommandInfo::new( commands::STATUS_FOCUS_RIGHT, true, main_cmds_available && !focus_on_diff, @@ -308,7 +308,7 @@ impl App { } res.push( - CommandInfo::new_new( + CommandInfo::new( commands::QUIT, true, main_cmds_available, diff --git a/src/components/changes.rs b/src/components/changes.rs index ab504ae6..0ab96c47 100644 --- a/src/components/changes.rs +++ b/src/components/changes.rs @@ -178,25 +178,25 @@ impl Component for ChangesComponent { ) -> CommandBlocking { let some_selection = self.selection().is_some(); if self.is_working_dir { - out.push(CommandInfo::new_new( + out.push(CommandInfo::new( commands::STAGE_FILE, some_selection, self.focused, )); - out.push(CommandInfo::new_new( + out.push(CommandInfo::new( commands::RESET_FILE, some_selection, self.focused, )); } else { - out.push(CommandInfo::new_new( + out.push(CommandInfo::new( commands::UNSTAGE_FILE, some_selection, self.focused, )); } - out.push(CommandInfo::new_new( + out.push(CommandInfo::new( commands::SCROLL, self.items.len() > 1, self.focused, diff --git a/src/components/command.rs b/src/components/command.rs index 5bf459c9..0f34c994 100644 --- a/src/components/command.rs +++ b/src/components/command.rs @@ -35,7 +35,7 @@ pub struct CommandInfo { impl CommandInfo { /// - pub fn new_new( + pub fn new( text: CommandText, enabled: bool, available: bool, diff --git a/src/components/commit.rs b/src/components/commit.rs index 97ca39ce..a906c5ca 100644 --- a/src/components/commit.rs +++ b/src/components/commit.rs @@ -54,17 +54,17 @@ impl Component for CommitComponent { out: &mut Vec, _force_all: bool, ) -> CommandBlocking { - out.push(CommandInfo::new_new( + out.push(CommandInfo::new( commands::COMMIT_OPEN, !self.stage_empty, !self.visible, )); - out.push(CommandInfo::new_new( + out.push(CommandInfo::new( commands::COMMIT_ENTER, self.can_commit(), self.visible, )); - out.push(CommandInfo::new_new( + out.push(CommandInfo::new( commands::CLOSE_POPUP, true, self.visible, diff --git a/src/components/diff.rs b/src/components/diff.rs index 90bae2a7..c5c75c39 100644 --- a/src/components/diff.rs +++ b/src/components/diff.rs @@ -248,7 +248,7 @@ impl Component for DiffComponent { out: &mut Vec, _force_all: bool, ) -> CommandBlocking { - out.push(CommandInfo::new_new( + out.push(CommandInfo::new( commands::SCROLL, self.can_scroll(), self.focused, diff --git a/src/components/help.rs b/src/components/help.rs index 3c5f6c7a..869257dd 100644 --- a/src/components/help.rs +++ b/src/components/help.rs @@ -67,7 +67,7 @@ impl Component for HelpComponent { } out.push( - CommandInfo::new_new( + CommandInfo::new( commands::HELP_OPEN, true, !self.visible, @@ -75,13 +75,13 @@ impl Component for HelpComponent { .order(99), ); - out.push(CommandInfo::new_new( + out.push(CommandInfo::new( commands::SCROLL, true, self.visible, )); - out.push(CommandInfo::new_new( + out.push(CommandInfo::new( commands::CLOSE_POPUP, true, self.visible,