Comments
Patch
@@ -5,8 +5,6 @@
/// The kind of command error
#[derive(Debug, PartialEq)]
pub enum CommandErrorKind {
- /// The command finished without error
- Ok,
/// The root of the repository cannot be found
RootNotFound,
/// The current directory cannot be found
@@ -20,7 +18,6 @@
impl CommandErrorKind {
pub fn get_exit_code(&self) -> exitcode::ExitCode {
match self {
- CommandErrorKind::Ok => exitcode::OK,
CommandErrorKind::RootNotFound => exitcode::ABORT,
CommandErrorKind::CurrentDirNotFound => exitcode::ABORT,
CommandErrorKind::StdoutError => exitcode::ABORT,
@@ -29,7 +29,7 @@
// TODO use formating macro
self.ui.write_stdout(&[bytes.as_slice(), b"\n"].concat())?;
- Err(CommandErrorKind::Ok.into())
+ Ok(())
}
fn display_error(&self, error: FindRootError) -> Result<(), CommandError> {