diff --git a/asyncgit/src/revlog.rs b/asyncgit/src/revlog.rs index 8af0fd3e..35bd506b 100644 --- a/asyncgit/src/revlog.rs +++ b/asyncgit/src/revlog.rs @@ -83,7 +83,7 @@ impl AsyncLog { /// pub fn set_background(&mut self) { - self.background.store(true, Ordering::Relaxed) + self.background.store(true, Ordering::Relaxed); } /// diff --git a/asyncgit/src/sync/diff.rs b/asyncgit/src/sync/diff.rs index 7fe3242a..9fb935de 100644 --- a/asyncgit/src/sync/diff.rs +++ b/asyncgit/src/sync/diff.rs @@ -245,7 +245,7 @@ fn raw_diff_to_file_diff<'a>( if h != hunk_header { adder(&h, ¤t_lines); current_lines.clear(); - current_hunk = Some(hunk_header) + current_hunk = Some(hunk_header); } } } diff --git a/asyncgit/src/sync/stash.rs b/asyncgit/src/sync/stash.rs index ff5999e6..e19079d9 100644 --- a/asyncgit/src/sync/stash.rs +++ b/asyncgit/src/sync/stash.rs @@ -118,7 +118,7 @@ pub fn stash_save( options.insert(StashFlags::INCLUDE_UNTRACKED); } if keep_index { - options.insert(StashFlags::KEEP_INDEX) + options.insert(StashFlags::KEEP_INDEX); } let id = repo.stash_save2(&sig, message, Some(options))?; diff --git a/asyncgit/src/sync/tags.rs b/asyncgit/src/sync/tags.rs index 9a0d4109..0c664660 100644 --- a/asyncgit/src/sync/tags.rs +++ b/asyncgit/src/sync/tags.rs @@ -31,7 +31,7 @@ pub fn get_tags(repo_path: &str) -> Result { let mut res = Tags::new(); let mut adder = |key, value: String| { if let Some(key) = res.get_mut(&key) { - key.push(value) + key.push(value); } else { res.insert(key, vec![value]); } diff --git a/filetreelist/src/item.rs b/filetreelist/src/item.rs index 5936b05f..8c9b6d16 100644 --- a/filetreelist/src/item.rs +++ b/filetreelist/src/item.rs @@ -143,7 +143,7 @@ impl FileTreeItem { *folded = folded.join(next.info.path()); } else { self.info.folded = - Some(self.info.path().join(next.info.path())) + Some(self.info.path().join(next.info.path())); } self.info.full_path = next.info.full_path; diff --git a/src/app.rs b/src/app.rs index b48ba0f6..c5d3b29c 100644 --- a/src/app.rs +++ b/src/app.rs @@ -328,7 +328,7 @@ impl App { pub fn update(&mut self) -> Result<()> { log::trace!("update"); - self.commit.update()?; + self.commit.update(); self.status_tab.update()?; self.revlog.update()?; self.files_tab.update()?; @@ -349,7 +349,7 @@ impl App { self.status_tab.update_git(ev)?; self.stashing_tab.update_git(ev)?; - self.files_tab.update_git(ev)?; + self.files_tab.update_git(ev); self.revlog.update_git(ev)?; self.blame_file_popup.update_git(ev)?; self.inspect_commit_popup.update_git(ev)?; @@ -482,15 +482,15 @@ impl App { fn switch_tab(&mut self, k: KeyEvent) -> Result<()> { if k == self.key_config.tab_status { - self.set_tab(0)? + self.set_tab(0)?; } else if k == self.key_config.tab_log { - self.set_tab(1)? + self.set_tab(1)?; } else if k == self.key_config.tab_files { - self.set_tab(2)? + self.set_tab(2)?; } else if k == self.key_config.tab_stashing { - self.set_tab(3)? + self.set_tab(3)?; } else if k == self.key_config.tab_stashes { - self.set_tab(4)? + self.set_tab(4)?; } Ok(()) @@ -578,14 +578,15 @@ impl App { InternalEvent::OpenCommit => self.commit.show()?, InternalEvent::PopupStashing(opts) => { self.stashmsg_popup.options(opts); - self.stashmsg_popup.show()? + self.stashmsg_popup.show()?; } InternalEvent::TagCommit(id) => { self.tag_commit_popup.open(id)?; } InternalEvent::BlameFile(path) => { self.blame_file_popup.open(&path)?; - flags.insert(NeedsUpdate::ALL | NeedsUpdate::COMMANDS) + flags + .insert(NeedsUpdate::ALL | NeedsUpdate::COMMANDS); } InternalEvent::CreateBranch => { self.create_branch_popup.open()?; @@ -603,7 +604,8 @@ impl App { InternalEvent::TabSwitch => self.set_tab(0)?, InternalEvent::InspectCommit(id, tags) => { self.inspect_commit_popup.open(id, tags)?; - flags.insert(NeedsUpdate::ALL | NeedsUpdate::COMMANDS) + flags + .insert(NeedsUpdate::ALL | NeedsUpdate::COMMANDS); } InternalEvent::SelectCommitInRevlog(id) => { if let Err(error) = self.revlog.select_commit(id) { @@ -611,36 +613,37 @@ impl App { InternalEvent::ShowErrorMsg( error.to_string(), ), - ) + ); } else { self.tags_popup.hide(); - flags.insert(NeedsUpdate::ALL) + flags.insert(NeedsUpdate::ALL); } } InternalEvent::OpenExternalEditor(path) => { self.input.set_polling(false); self.external_editor_popup.show()?; self.file_to_open = path; - flags.insert(NeedsUpdate::COMMANDS) + flags.insert(NeedsUpdate::COMMANDS); } InternalEvent::Push(branch, force) => { self.push_popup.push(branch, force)?; - flags.insert(NeedsUpdate::ALL) + flags.insert(NeedsUpdate::ALL); } InternalEvent::Pull(branch) => { self.pull_popup.fetch(branch)?; - flags.insert(NeedsUpdate::ALL) + flags.insert(NeedsUpdate::ALL); } InternalEvent::PushTags => { self.push_tags_popup.push_tags()?; - flags.insert(NeedsUpdate::ALL) + flags.insert(NeedsUpdate::ALL); } InternalEvent::StatusLastFileMoved => { self.status_tab.last_file_moved()?; } InternalEvent::OpenFileTree(c) => { self.revision_files_popup.open(c)?; - flags.insert(NeedsUpdate::ALL | NeedsUpdate::COMMANDS) + flags + .insert(NeedsUpdate::ALL | NeedsUpdate::COMMANDS); } }; @@ -676,7 +679,7 @@ impl App { { self.queue.borrow_mut().push_back( InternalEvent::ShowErrorMsg(e.to_string()), - ) + ); } else { flags.insert(NeedsUpdate::ALL); self.select_branch_popup.update_branches()?; @@ -688,7 +691,7 @@ impl App { InternalEvent::ShowErrorMsg( error.to_string(), ), - ) + ); } else { flags.insert(NeedsUpdate::ALL); self.tags_popup.update_tags()?; diff --git a/src/args.rs b/src/args.rs index 9ff40870..57e5be83 100644 --- a/src/args.rs +++ b/src/args.rs @@ -49,7 +49,7 @@ pub fn process_cmdline() -> Result { let arg_matches = app.get_matches(); if arg_matches.is_present("bugreport") { - bug_report::generate_bugreport()?; + bug_report::generate_bugreport(); std::process::exit(0); } if arg_matches.is_present("logging") { diff --git a/src/bug_report.rs b/src/bug_report.rs index 4d6dabc2..19da075e 100644 --- a/src/bug_report.rs +++ b/src/bug_report.rs @@ -1,4 +1,3 @@ -use anyhow::Result; use bugreport::{ bugreport, collector::{ @@ -8,7 +7,7 @@ use bugreport::{ format::Markdown, }; -pub fn generate_bugreport() -> Result<()> { +pub fn generate_bugreport() { bugreport!() .info(SoftwareVersion::default()) .info(OperatingSystem::default()) @@ -21,5 +20,4 @@ pub fn generate_bugreport() -> Result<()> { ])) .info(CommandLine::default()) .print::(); - Ok(()) } diff --git a/src/components/blame_file.rs b/src/components/blame_file.rs index cb48e41d..b560d301 100644 --- a/src/components/blame_file.rs +++ b/src/components/blame_file.rs @@ -231,7 +231,7 @@ impl Component for BlameFileComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { @@ -288,7 +288,7 @@ impl BlameFileComponent { ) -> Result<()> { if self.is_visible() { if let AsyncNotification::Blame = event { - self.update()? + self.update()?; } } diff --git a/src/components/branchlist.rs b/src/components/branchlist.rs index 7db47b4f..56c7cf98 100644 --- a/src/components/branchlist.rs +++ b/src/components/branchlist.rs @@ -173,7 +173,7 @@ impl Component for BranchListComponent { if self.visible { if let Event::Key(e) = ev { if e == self.key_config.exit_popup { - self.hide() + self.hide(); } else if e == self.key_config.move_down { return self .move_selection(ScrollType::Up) @@ -259,7 +259,7 @@ impl Component for BranchListComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { @@ -490,7 +490,7 @@ impl BranchListComponent { asyncgit::CWD, &self.branches[self.selection as usize].reference, )?; - self.hide() + self.hide(); } else { checkout_remote_branch( CWD, diff --git a/src/components/changes.rs b/src/components/changes.rs index 6f5cf20b..de381326 100644 --- a/src/components/changes.rs +++ b/src/components/changes.rs @@ -82,7 +82,7 @@ impl ChangesComponent { let path = Path::new(i.path.as_str()); match i.status { StatusItemType::Deleted => { - sync::stage_addremoved(CWD, path)? + sync::stage_addremoved(CWD, path)?; } _ => sync::stage_add_file(CWD, path)?, }; @@ -306,6 +306,6 @@ impl Component for ChangesComponent { self.files.focused() } fn focus(&mut self, focus: bool) { - self.files.focus(focus) + self.files.focus(focus); } } diff --git a/src/components/commit.rs b/src/components/commit.rs index 08219d60..f065e79e 100644 --- a/src/components/commit.rs +++ b/src/components/commit.rs @@ -74,10 +74,8 @@ impl CommitComponent { } /// - pub fn update(&mut self) -> Result<()> { - self.git_branch_name.lookup().map(Some).unwrap_or(None); - - Ok(()) + pub fn update(&mut self) { + self.git_branch_name.lookup().ok(); } fn draw_branch_name(&self, f: &mut Frame) { @@ -370,7 +368,7 @@ impl Component for CommitComponent { } fn hide(&mut self) { - self.input.hide() + self.input.hide(); } fn show(&mut self) -> Result<()> { diff --git a/src/components/commit_details/details.rs b/src/components/commit_details/details.rs index ea344804..d508bb1c 100644 --- a/src/components/commit_details/details.rs +++ b/src/components/commit_details/details.rs @@ -69,7 +69,7 @@ impl DetailsComponent { &mut self, id: Option, tags: Option, - ) -> Result<()> { + ) { self.tags.clear(); self.data = @@ -78,10 +78,8 @@ impl DetailsComponent { self.scroll_top.set(0); if let Some(tags) = tags { - self.tags.extend(tags) + self.tags.extend(tags); } - - Ok(()) } fn wrap_commit_details( @@ -377,7 +375,7 @@ impl DrawableComponent for DetailsComponent { &self.theme, Self::get_number_of_lines(&self.data, width as usize), self.scroll_top.get(), - ) + ); } Ok(()) diff --git a/src/components/commit_details/mod.rs b/src/components/commit_details/mod.rs index e2ba9af2..850dfc86 100644 --- a/src/components/commit_details/mod.rs +++ b/src/components/commit_details/mod.rs @@ -75,7 +75,7 @@ impl CommitDetailsComponent { id: Option, tags: Option, ) -> Result<()> { - self.details.set_commit(id, tags)?; + self.details.set_commit(id, tags); if let Some(id) = id { if let Some((fetched_id, res)) = diff --git a/src/components/create_branch.rs b/src/components/create_branch.rs index f3c77ebb..68498290 100644 --- a/src/components/create_branch.rs +++ b/src/components/create_branch.rs @@ -75,7 +75,7 @@ impl Component for CreateBranchComponent { } fn hide(&mut self) { - self.input.hide() + self.input.hide(); } fn show(&mut self) -> Result<()> { diff --git a/src/components/diff.rs b/src/components/diff.rs index de449f6e..53a4f4e2 100644 --- a/src/components/diff.rs +++ b/src/components/diff.rs @@ -147,15 +147,13 @@ impl DiffComponent { (self.current.path.clone(), self.current.is_stage) } /// - pub fn clear(&mut self, pending: bool) -> Result<()> { + pub fn clear(&mut self, pending: bool) { self.current = Current::default(); self.diff = None; self.scroll_top.set(0); self.selection = Selection::Single(0); self.selected_hunk = None; self.pending = pending; - - Ok(()) } /// pub fn update( @@ -163,7 +161,7 @@ impl DiffComponent { path: String, is_stage: bool, diff: FileDiff, - ) -> Result<()> { + ) { self.pending = false; let hash = hash(&diff); @@ -191,8 +189,6 @@ impl DiffComponent { self.update_selection(old_selection); } } - - Ok(()) } fn move_selection(&mut self, move_type: ScrollType) { @@ -808,6 +804,6 @@ impl Component for DiffComponent { self.focused } fn focus(&mut self, focus: bool) { - self.focused = focus + self.focused = focus; } } diff --git a/src/components/externaleditor.rs b/src/components/externaleditor.rs index 00e2a564..d1db695c 100644 --- a/src/components/externaleditor.rs +++ b/src/components/externaleditor.rs @@ -179,7 +179,7 @@ impl Component for ExternalEditorComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { diff --git a/src/components/help.rs b/src/components/help.rs index 0276c287..6715f8d8 100644 --- a/src/components/help.rs +++ b/src/components/help.rs @@ -125,11 +125,11 @@ impl Component for HelpComponent { if self.visible { if let Event::Key(e) = ev { if e == self.key_config.exit_popup { - self.hide() + self.hide(); } else if e == self.key_config.move_down { - self.move_selection(true) + self.move_selection(true); } else if e == self.key_config.move_up { - self.move_selection(false) + self.move_selection(false); } else { } } @@ -152,7 +152,7 @@ impl Component for HelpComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { diff --git a/src/components/inspect_commit.rs b/src/components/inspect_commit.rs index 8d3fb39b..c7536ce8 100644 --- a/src/components/inspect_commit.rs +++ b/src/components/inspect_commit.rs @@ -227,9 +227,9 @@ impl InspectCommitComponent { ) -> Result<()> { if self.is_visible() { if let AsyncNotification::CommitFiles = ev { - self.update()? + self.update()?; } else if let AsyncNotification::Diff = ev { - self.update_diff()? + self.update_diff()?; } } @@ -251,18 +251,18 @@ impl InspectCommitComponent { self.git_diff.last()? { if params == diff_params { - self.diff.update(f.path, false, last)?; + self.diff.update(f.path, false, last); return Ok(()); } } self.git_diff.request(diff_params)?; - self.diff.clear(true)?; + self.diff.clear(true); return Ok(()); } } - self.diff.clear(false)?; + self.diff.clear(false); } Ok(()) diff --git a/src/components/msg.rs b/src/components/msg.rs index 52534348..606949a4 100644 --- a/src/components/msg.rs +++ b/src/components/msg.rs @@ -47,9 +47,9 @@ impl DrawableComponent for MsgComponent { u16::try_from(max).expect("cant fail due to check above"); // dont overflow screen, and dont get too narrow if width > f.size().width { - width = f.size().width + width = f.size().width; } else if width < 60 { - width = 60 + width = 60; } let area = ui::centered_rect_absolute(width, 25, f.size()); @@ -107,7 +107,7 @@ impl Component for MsgComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { diff --git a/src/components/pull.rs b/src/components/pull.rs index 6af2764e..7c4f5de1 100644 --- a/src/components/pull.rs +++ b/src/components/pull.rs @@ -282,7 +282,7 @@ impl Component for PullComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { diff --git a/src/components/push.rs b/src/components/push.rs index 429719fd..29fad53d 100644 --- a/src/components/push.rs +++ b/src/components/push.rs @@ -297,7 +297,7 @@ impl Component for PushComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { diff --git a/src/components/push_tags.rs b/src/components/push_tags.rs index 03ecb7a9..2e67ad04 100644 --- a/src/components/push_tags.rs +++ b/src/components/push_tags.rs @@ -253,7 +253,7 @@ impl Component for PushTagsComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { diff --git a/src/components/rename_branch.rs b/src/components/rename_branch.rs index 343305c5..0963e0d6 100644 --- a/src/components/rename_branch.rs +++ b/src/components/rename_branch.rs @@ -79,7 +79,7 @@ impl Component for RenameBranchComponent { } fn hide(&mut self) { - self.input.hide() + self.input.hide(); } fn show(&mut self) -> Result<()> { diff --git a/src/components/reset.rs b/src/components/reset.rs index 2f3669d3..1aa094d2 100644 --- a/src/components/reset.rs +++ b/src/components/reset.rs @@ -91,7 +91,7 @@ impl Component for ResetComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { diff --git a/src/components/revision_files_popup.rs b/src/components/revision_files_popup.rs index 4f928ec1..b90b3ff4 100644 --- a/src/components/revision_files_popup.rs +++ b/src/components/revision_files_popup.rs @@ -130,7 +130,7 @@ impl Component for RevisionFilesPopup { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { diff --git a/src/components/stashmsg.rs b/src/components/stashmsg.rs index 10e36bbe..9d428bad 100644 --- a/src/components/stashmsg.rs +++ b/src/components/stashmsg.rs @@ -112,7 +112,7 @@ impl Component for StashMsgComponent { } fn hide(&mut self) { - self.input.hide() + self.input.hide(); } fn show(&mut self) -> Result<()> { diff --git a/src/components/syntax_text.rs b/src/components/syntax_text.rs index 6ac00831..978f9840 100644 --- a/src/components/syntax_text.rs +++ b/src/components/syntax_text.rs @@ -106,7 +106,7 @@ impl SyntaxTextComponent { ); self.current_file = - Some((path, Either::Right(content))) + Some((path, Either::Right(content))); } Err(e) => { self.current_file = Some(( @@ -115,7 +115,7 @@ impl SyntaxTextComponent { "error loading file: {}", e )), - )) + )); } } } @@ -262,6 +262,6 @@ impl Component for SyntaxTextComponent { /// focus/unfocus this component depending on param fn focus(&mut self, focus: bool) { - self.focused = focus + self.focused = focus; } } diff --git a/src/components/tag_commit.rs b/src/components/tag_commit.rs index c74df0ba..7beec95f 100644 --- a/src/components/tag_commit.rs +++ b/src/components/tag_commit.rs @@ -65,7 +65,7 @@ impl Component for TagCommitComponent { if let Event::Key(e) = ev { if e == self.key_config.enter { - self.tag() + self.tag(); } return Ok(EventState::Consumed); @@ -79,7 +79,7 @@ impl Component for TagCommitComponent { } fn hide(&mut self) { - self.input.hide() + self.input.hide(); } fn show(&mut self) -> Result<()> { diff --git a/src/components/taglist.rs b/src/components/taglist.rs index 8b1945d9..b1175625 100644 --- a/src/components/taglist.rs +++ b/src/components/taglist.rs @@ -158,7 +158,7 @@ impl Component for TagListComponent { if self.visible { if let Event::Key(key) = event { if key == self.key_config.exit_popup { - self.hide() + self.hide(); } else if key == self.key_config.move_up { self.move_selection(ScrollType::Up); } else if key == self.key_config.move_down { @@ -215,7 +215,7 @@ impl Component for TagListComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { diff --git a/src/components/textinput.rs b/src/components/textinput.rs index f72870d9..0eb71031 100644 --- a/src/components/textinput.rs +++ b/src/components/textinput.rs @@ -257,7 +257,7 @@ fn text_append<'a>(txt: Text<'a>, append: Text<'a>) -> Text<'a> { } } } else { - txt = append + txt = append; } txt } @@ -384,7 +384,7 @@ impl Component for TextInputComponent { } fn hide(&mut self) { - self.visible = false + self.visible = false; } fn show(&mut self) -> Result<()> { diff --git a/src/components/utils/statustree.rs b/src/components/utils/statustree.rs index d687062c..ba8d5a5e 100644 --- a/src/components/utils/statustree.rs +++ b/src/components/utils/statustree.rs @@ -358,7 +358,7 @@ impl StatusTree { let item = &mut self.tree[i]; let item_path = &item.info.full_path; if item_path.starts_with(&path) { - item.info.visible = false + item.info.visible = false; } else { return; } @@ -416,7 +416,7 @@ impl StatusTree { if prefix .map_or(true, |prefix| item_path.starts_with(prefix)) { - self.tree[i].info.visible = true + self.tree[i].info.visible = true; } else { // if we do not set defaults we can early out if set_defaults { diff --git a/src/input.rs b/src/input.rs index b34730e1..28a2356c 100644 --- a/src/input.rs +++ b/src/input.rs @@ -69,7 +69,7 @@ impl Input { /// pub fn set_polling(&mut self, enabled: bool) { - self.desired_state.set_and_notify(enabled) + self.desired_state.set_and_notify(enabled); } fn shall_poll(&self) -> bool { @@ -111,7 +111,7 @@ impl Input { if arc_current.load(Ordering::Relaxed) { log::info!("input polling suspended"); - tx.send(InputEvent::State(InputState::Paused))? + tx.send(InputEvent::State(InputState::Paused))?; } arc_current.store(false, Ordering::Relaxed); diff --git a/src/main.rs b/src/main.rs index ba422a34..68efee4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -144,13 +144,13 @@ fn main() -> Result<()> { //Note: external ed closed, we need to re-hide cursor terminal.hide_cursor()?; } - app.event(ev)? + app.event(ev)?; } QueueEvent::Tick => app.update()?, QueueEvent::GitEvent(ev) if ev != AsyncNotification::FinishUnchanged => { - app.update_git(ev)? + app.update_git(ev)?; } QueueEvent::GitEvent(..) => (), QueueEvent::SpinnerUpdate => unreachable!(), @@ -201,7 +201,7 @@ fn draw( terminal.draw(|mut f| { if let Err(e) = app.draw(&mut f) { - log::error!("failed to draw: {:?}", e) + log::error!("failed to draw: {:?}", e); } })?; diff --git a/src/tabs/files.rs b/src/tabs/files.rs index 17cf2db1..42899aec 100644 --- a/src/tabs/files.rs +++ b/src/tabs/files.rs @@ -62,15 +62,10 @@ impl FilesTab { } /// - pub fn update_git( - &mut self, - ev: AsyncNotification, - ) -> Result<()> { + pub fn update_git(&mut self, ev: AsyncNotification) { if self.is_visible() { self.files.update(ev); } - - Ok(()) } } diff --git a/src/tabs/stashlist.rs b/src/tabs/stashlist.rs index 335a09bd..408fc77c 100644 --- a/src/tabs/stashlist.rs +++ b/src/tabs/stashlist.rs @@ -194,13 +194,13 @@ impl Component for StashList { if let Event::Key(k) = ev { if k == self.key_config.enter { - self.pop_stash() + self.pop_stash(); } else if k == self.key_config.stash_apply { - self.apply_stash() + self.apply_stash(); } else if k == self.key_config.stash_drop { - self.drop_stash() + self.drop_stash(); } else if k == self.key_config.stash_open { - self.inspect() + self.inspect(); } } } diff --git a/src/tabs/status.rs b/src/tabs/status.rs index 068a3f02..43c7b507 100644 --- a/src/tabs/status.rs +++ b/src/tabs/status.rs @@ -399,7 +399,7 @@ impl Status { // maybe the diff changed (outside file change) if let Some((params, last)) = self.git_diff.last()? { if params == diff_params { - self.diff.update(path, is_stage, last)?; + self.diff.update(path, is_stage, last); } } } else { @@ -407,13 +407,13 @@ impl Status { if let Some(diff) = self.git_diff.request(diff_params)? { - self.diff.update(path, is_stage, diff)?; + self.diff.update(path, is_stage, diff); } else { - self.diff.clear(true)?; + self.diff.clear(true); } } } else { - self.diff.clear(false)?; + self.diff.clear(false); } Ok(()) @@ -488,7 +488,7 @@ impl Status { } pub fn abort_merge(&self) { - try_or_popup!(self, "abort merge", sync::abort_merge(CWD)) + try_or_popup!(self, "abort merge", sync::abort_merge(CWD)); } fn commands_nav( diff --git a/src/ui/scrollbar.rs b/src/ui/scrollbar.rs index a77d3023..a1184217 100644 --- a/src/ui/scrollbar.rs +++ b/src/ui/scrollbar.rs @@ -78,5 +78,5 @@ pub fn draw_scrollbar( ) { let mut widget = Scrollbar::new(max, pos); widget.style_pos = theme.scroll_bar_pos(); - f.render_widget(widget, r) + f.render_widget(widget, r); } diff --git a/src/ui/scrolllist.rs b/src/ui/scrolllist.rs index 0678bcff..6fe8017e 100644 --- a/src/ui/scrolllist.rs +++ b/src/ui/scrolllist.rs @@ -71,7 +71,7 @@ pub fn draw_list<'b, B: Backend, L>( .borders(Borders::ALL) .border_style(theme.block(selected)), ); - f.render_widget(list, r) + f.render_widget(list, r); } pub fn draw_list_block<'b, B: Backend, L>( @@ -83,5 +83,5 @@ pub fn draw_list_block<'b, B: Backend, L>( L: Iterator>, { let list = ScrollableList::new(items).block(block); - f.render_widget(list, r) + f.render_widget(list, r); }