Show More
@@ -63,7 +63,6 b' pub type FastHashbrownMap<K, V> =' | |||||
63 | #[derive(Debug, PartialEq)] |
|
63 | #[derive(Debug, PartialEq)] | |
64 | pub enum DirstateMapError { |
|
64 | pub enum DirstateMapError { | |
65 | PathNotFound(HgPathBuf), |
|
65 | PathNotFound(HgPathBuf), | |
66 | EmptyPath, |
|
|||
67 | InvalidPath(HgPathError), |
|
66 | InvalidPath(HgPathError), | |
68 | } |
|
67 | } | |
69 |
|
68 | |||
@@ -73,9 +72,6 b' impl fmt::Display for DirstateMapError {' | |||||
73 | DirstateMapError::PathNotFound(_) => { |
|
72 | DirstateMapError::PathNotFound(_) => { | |
74 | f.write_str("expected a value, found none") |
|
73 | f.write_str("expected a value, found none") | |
75 | } |
|
74 | } | |
76 | DirstateMapError::EmptyPath => { |
|
|||
77 | f.write_str("Overflow in dirstate.") |
|
|||
78 | } |
|
|||
79 | DirstateMapError::InvalidPath(path_error) => path_error.fmt(f), |
|
75 | DirstateMapError::InvalidPath(path_error) => path_error.fmt(f), | |
80 | } |
|
76 | } | |
81 | } |
|
77 | } |
@@ -17,7 +17,7 b' use cpython::{' | |||||
17 |
|
17 | |||
18 | use hg::{ |
|
18 | use hg::{ | |
19 | utils::hg_path::{HgPath, HgPathBuf}, |
|
19 | utils::hg_path::{HgPath, HgPathBuf}, | |
20 |
DirsMultiset, DirsMultisetIter, |
|
20 | DirsMultiset, DirsMultisetIter, | |
21 | }; |
|
21 | }; | |
22 |
|
22 | |||
23 | py_class!(pub class Dirs |py| { |
|
23 | py_class!(pub class Dirs |py| { | |
@@ -56,9 +56,6 b' py_class!(pub class Dirs |py| {' | |||||
56 | HgPath::new(path.extract::<PyBytes>(py)?.data(py)), |
|
56 | HgPath::new(path.extract::<PyBytes>(py)?.data(py)), | |
57 | ).and(Ok(py.None())).or_else(|e| { |
|
57 | ).and(Ok(py.None())).or_else(|e| { | |
58 | match e { |
|
58 | match e { | |
59 | DirstateMapError::EmptyPath => { |
|
|||
60 | Ok(py.None()) |
|
|||
61 | }, |
|
|||
62 | e => { |
|
59 | e => { | |
63 | Err(PyErr::new::<exc::ValueError, _>( |
|
60 | Err(PyErr::new::<exc::ValueError, _>( | |
64 | py, |
|
61 | py, | |
@@ -76,9 +73,6 b' py_class!(pub class Dirs |py| {' | |||||
76 | .and(Ok(py.None())) |
|
73 | .and(Ok(py.None())) | |
77 | .or_else(|e| { |
|
74 | .or_else(|e| { | |
78 | match e { |
|
75 | match e { | |
79 | DirstateMapError::EmptyPath => { |
|
|||
80 | Ok(py.None()) |
|
|||
81 | }, |
|
|||
82 | e => { |
|
76 | e => { | |
83 | Err(PyErr::new::<exc::ValueError, _>( |
|
77 | Err(PyErr::new::<exc::ValueError, _>( | |
84 | py, |
|
78 | py, |
General Comments 0
You need to be logged in to leave comments.
Login now