##// END OF EJS Templates
rust: remove unused `StatusError::IO` enum variant...
Simon Sapin -
r49590:6e930bc4 default
parent child Browse files
Show More
@@ -128,8 +128,6 b" pub struct StatusPath<'a> {"
128
128
129 #[derive(Debug, derive_more::From)]
129 #[derive(Debug, derive_more::From)]
130 pub enum StatusError {
130 pub enum StatusError {
131 /// Generic IO error
132 IO(std::io::Error),
133 /// An invalid path that cannot be represented in Mercurial was found
131 /// An invalid path that cannot be represented in Mercurial was found
134 Path(HgPathError),
132 Path(HgPathError),
135 /// An invalid "ignore" pattern was found
133 /// An invalid "ignore" pattern was found
@@ -143,7 +141,6 b' pub type StatusResult<T> = Result<T, Sta'
143 impl fmt::Display for StatusError {
141 impl fmt::Display for StatusError {
144 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
142 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
145 match self {
143 match self {
146 StatusError::IO(error) => error.fmt(f),
147 StatusError::Path(error) => error.fmt(f),
144 StatusError::Path(error) => error.fmt(f),
148 StatusError::Pattern(error) => error.fmt(f),
145 StatusError::Pattern(error) => error.fmt(f),
149 StatusError::DirstateV2ParseError(_) => {
146 StatusError::DirstateV2ParseError(_) => {
@@ -10,7 +10,6 b''
10 //! `rustext.dirstate.status`.
10 //! `rustext.dirstate.status`.
11
11
12 use crate::{dirstate::DirstateMap, exceptions::FallbackError};
12 use crate::{dirstate::DirstateMap, exceptions::FallbackError};
13 use cpython::exc::OSError;
14 use cpython::{
13 use cpython::{
15 exc::ValueError, ObjectProtocol, PyBytes, PyErr, PyList, PyObject,
14 exc::ValueError, ObjectProtocol, PyBytes, PyErr, PyList, PyObject,
16 PyResult, PyTuple, Python, PythonObject, ToPyObject,
15 PyResult, PyTuple, Python, PythonObject, ToPyObject,
@@ -95,7 +94,6 b' fn handle_fallback(py: Python, err: Stat'
95
94
96 PyErr::new::<FallbackError, _>(py, &as_string)
95 PyErr::new::<FallbackError, _>(py, &as_string)
97 }
96 }
98 StatusError::IO(e) => PyErr::new::<OSError, _>(py, e.to_string()),
99 e => PyErr::new::<ValueError, _>(py, e.to_string()),
97 e => PyErr::new::<ValueError, _>(py, e.to_string()),
100 }
98 }
101 }
99 }
General Comments 0
You need to be logged in to leave comments. Login now