##// END OF EJS Templates
hg-core: impl TryFrom<PathBuff> for HgPathBuf...
Antoine Cezar -
r46109:2d5dfc8f default
parent child Browse files
Show More
@@ -6,6 +6,7 b''
6 6 // GNU General Public License version 2 or any later version.
7 7
8 8 use std::borrow::Borrow;
9 use std::convert::TryFrom;
9 10 use std::ffi::{OsStr, OsString};
10 11 use std::fmt;
11 12 use std::ops::Deref;
@@ -515,6 +516,13 b' pub fn path_to_hg_path_buf<P: AsRef<Path'
515 516 Ok(buf)
516 517 }
517 518
519 impl TryFrom<PathBuf> for HgPathBuf {
520 type Error = HgPathError;
521 fn try_from(path: PathBuf) -> Result<Self, Self::Error> {
522 path_to_hg_path_buf(path)
523 }
524 }
525
518 526 #[cfg(test)]
519 527 mod tests {
520 528 use super::*;
General Comments 0
You need to be logged in to leave comments. Login now