Mercurial > hg
comparison rust/rhg/src/error.rs @ 45439:fbc373b7cbc3
rhg: fix `clippy` warnings
Differential Revision: https://phab.mercurial-scm.org/D8955
author | Antoine Cezar <antoine.cezar@octobus.net> |
---|---|
date | Thu, 13 Aug 2020 16:36:42 +0200 |
parents | 5fe25f8ef5d9 |
children | 33ded2d3f4fc |
comparison
equal
deleted
inserted
replaced
45438:ed95ccc94333 | 45439:fbc373b7cbc3 |
---|---|
67 pub kind: CommandErrorKind, | 67 pub kind: CommandErrorKind, |
68 } | 68 } |
69 | 69 |
70 impl CommandError { | 70 impl CommandError { |
71 /// Exist the process with the corresponding exit code. | 71 /// Exist the process with the corresponding exit code. |
72 pub fn exit(&self) -> () { | 72 pub fn exit(&self) { |
73 std::process::exit(self.kind.get_exit_code()) | 73 std::process::exit(self.kind.get_exit_code()) |
74 } | 74 } |
75 | 75 |
76 /// Return the message corresponding to the command error if any | 76 /// Return the message corresponding to the command error if any |
77 pub fn get_error_message_bytes(&self) -> Option<Vec<u8>> { | 77 pub fn get_error_message_bytes(&self) -> Option<Vec<u8>> { |