rust/rhg/src/error.rs
changeset 46503 d8730ff51d5a
parent 46499 eace48b4a786
child 46591 21d3b40b4c0e
equal deleted inserted replaced
46502:95d37db31479 46503:d8730ff51d5a
    52 }
    52 }
    53 
    53 
    54 impl From<RepoError> for CommandError {
    54 impl From<RepoError> for CommandError {
    55     fn from(error: RepoError) -> Self {
    55     fn from(error: RepoError) -> Self {
    56         match error {
    56         match error {
    57             RepoError::NotFound { current_directory } => CommandError::Abort {
    57             RepoError::NotFound { at } => CommandError::Abort {
    58                 message: format_bytes!(
    58                 message: format_bytes!(
    59                     b"no repository found in '{}' (.hg not found)!",
    59                     b"no repository found in '{}' (.hg not found)!",
    60                     get_bytes_from_path(current_directory)
    60                     get_bytes_from_path(at)
    61                 ),
    61                 ),
    62             },
    62             },
    63             RepoError::ConfigParseError(error) => error.into(),
    63             RepoError::ConfigParseError(error) => error.into(),
    64             RepoError::Other(error) => error.into(),
    64             RepoError::Other(error) => error.into(),
    65         }
    65         }