diff options
author | Tim Oram <dev@mitmaro.ca> | 2020-09-21 09:55:06 -0230 |
---|---|---|
committer | Tim Oram <dev@mitmaro.ca> | 2020-09-21 10:12:39 -0230 |
commit | c6f3e0e81bf2697ff2289fde22a8b24a5bfeb4dd (patch) | |
tree | 2987556cff6f187a93a9a5316bddc9253ab8dc8e /src/process/help.rs | |
parent | 6ec8d78c48c8e8dd82812415108e2252fd652b24 (diff) |
Use anyhow in process module trait
Update the activate function in the process module trait to use anyhow
for error handling and update any usages of the error to use the new
error type.
Diffstat (limited to 'src/process/help.rs')
-rw-r--r-- | src/process/help.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/process/help.rs b/src/process/help.rs index 832e24d..a003398 100644 --- a/src/process/help.rs +++ b/src/process/help.rs @@ -9,6 +9,7 @@ use crate::view::line_segment::LineSegment; use crate::view::view_data::ViewData; use crate::view::view_line::ViewLine; use crate::view::View; +use anyhow::Result; use unicode_segmentation::UnicodeSegmentation; fn get_max_help_key_length(lines: &[(String, String)]) -> usize { @@ -29,7 +30,7 @@ pub struct Help { } impl ProcessModule for Help { - fn activate(&mut self, _: &GitInteractive, return_state: State) -> Result<(), String> { + fn activate(&mut self, _: &GitInteractive, return_state: State) -> Result<()> { if self.return_state.is_none() { self.return_state = Some(return_state); } |