Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/dirstate/status.rs @ 44529:f96b28aa4b79
rust-status: update rust-cpython bridge to account for the changes in core
Differential Revision: https://phab.mercurial-scm.org/D7930
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Fri, 17 Jan 2020 15:09:02 +0100 |
parents | c8891bca40fb |
children | 07d9fd6097e6 |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/status.rs Fri Jan 17 15:43:46 2020 +0100 +++ b/rust/hg-core/src/dirstate/status.rs Fri Jan 17 15:09:02 2020 +0100 @@ -48,6 +48,20 @@ Unknown, } +impl ToString for BadType { + fn to_string(&self) -> String { + match self { + BadType::CharacterDevice => "character device", + BadType::BlockDevice => "block device", + BadType::FIFO => "fifo", + BadType::Socket => "socket", + BadType::Directory => "directory", + BadType::Unknown => "unknown", + } + .to_string() + } +} + /// Was explicitly matched but cannot be found/accessed #[derive(Debug)] pub enum BadMatch {