Show More
@@ -29,7 +29,7 b' impl RootCommand {' | |||
|
29 | 29 | // TODO use formating macro |
|
30 | 30 | self.ui.write_stdout(&[bytes.as_slice(), b"\n"].concat())?; |
|
31 | 31 | |
|
32 | Err(CommandErrorKind::Ok.into()) | |
|
32 | Ok(()) | |
|
33 | 33 | } |
|
34 | 34 | |
|
35 | 35 | fn display_error(&self, error: FindRootError) -> Result<(), CommandError> { |
@@ -5,8 +5,6 b' use std::convert::From;' | |||
|
5 | 5 | /// The kind of command error |
|
6 | 6 | #[derive(Debug, PartialEq)] |
|
7 | 7 | pub enum CommandErrorKind { |
|
8 | /// The command finished without error | |
|
9 | Ok, | |
|
10 | 8 | /// The root of the repository cannot be found |
|
11 | 9 | RootNotFound, |
|
12 | 10 | /// The current directory cannot be found |
@@ -20,7 +18,6 b' pub enum CommandErrorKind {' | |||
|
20 | 18 | impl CommandErrorKind { |
|
21 | 19 | pub fn get_exit_code(&self) -> exitcode::ExitCode { |
|
22 | 20 | match self { |
|
23 | CommandErrorKind::Ok => exitcode::OK, | |
|
24 | 21 | CommandErrorKind::RootNotFound => exitcode::ABORT, |
|
25 | 22 | CommandErrorKind::CurrentDirNotFound => exitcode::ABORT, |
|
26 | 23 | CommandErrorKind::StdoutError => exitcode::ABORT, |
General Comments 0
You need to be logged in to leave comments.
Login now