rust/rhg/src/error.rs
changeset 46591 21d3b40b4c0e
parent 46503 d8730ff51d5a
child 46593 5ce2aa7c2ad5
equal deleted inserted replaced
46590:8d20abed6a1e 46591:21d3b40b4c0e
    28             // TODO: bytes-based (instead of Unicode-based) formatting
    28             // TODO: bytes-based (instead of Unicode-based) formatting
    29             // of error messages to handle non-UTF-8 filenames etc:
    29             // of error messages to handle non-UTF-8 filenames etc:
    30             // https://www.mercurial-scm.org/wiki/EncodingStrategy#Mixing_output
    30             // https://www.mercurial-scm.org/wiki/EncodingStrategy#Mixing_output
    31             message: utf8_to_local(message.as_ref()).into(),
    31             message: utf8_to_local(message.as_ref()).into(),
    32         }
    32         }
       
    33     }
       
    34 }
       
    35 
       
    36 /// For now we don’t differenciate between invalid CLI args and valid for `hg`
       
    37 /// but not supported yet by `rhg`.
       
    38 impl From<clap::Error> for CommandError {
       
    39     fn from(_: clap::Error) -> Self {
       
    40         CommandError::Unimplemented
    33     }
    41     }
    34 }
    42 }
    35 
    43 
    36 impl From<HgError> for CommandError {
    44 impl From<HgError> for CommandError {
    37     fn from(error: HgError) -> Self {
    45     fn from(error: HgError) -> Self {