rust/hg-core/src/errors.rs
changeset 46740 97ac588b6d9e
parent 46735 12d59eec7f1d
child 46797 bcdcb4423ae3
equal deleted inserted replaced
46739:c184b490da37 46740:97ac588b6d9e
    48     RemovingFile(std::path::PathBuf),
    48     RemovingFile(std::path::PathBuf),
    49     RenamingFile {
    49     RenamingFile {
    50         from: std::path::PathBuf,
    50         from: std::path::PathBuf,
    51         to: std::path::PathBuf,
    51         to: std::path::PathBuf,
    52     },
    52     },
       
    53     /// `std::fs::canonicalize`
       
    54     CanonicalizingPath(std::path::PathBuf),
    53     /// `std::env::current_dir`
    55     /// `std::env::current_dir`
    54     CurrentDir,
    56     CurrentDir,
    55     /// `std::env::current_exe`
    57     /// `std::env::current_exe`
    56     CurrentExe,
    58     CurrentExe,
    57 }
    59 }
   126                 f,
   128                 f,
   127                 "when renaming {} to {}",
   129                 "when renaming {} to {}",
   128                 from.display(),
   130                 from.display(),
   129                 to.display()
   131                 to.display()
   130             ),
   132             ),
       
   133             IoErrorContext::CanonicalizingPath(path) => {
       
   134                 write!(f, "when canonicalizing {}", path.display())
       
   135             }
   131             IoErrorContext::CurrentDir => {
   136             IoErrorContext::CurrentDir => {
   132                 write!(f, "error getting current working directory")
   137                 write!(f, "error getting current working directory")
   133             }
   138             }
   134             IoErrorContext::CurrentExe => {
   139             IoErrorContext::CurrentExe => {
   135                 write!(f, "error getting current executable")
   140                 write!(f, "error getting current executable")