comparison rust/hg-cpython/src/dirstate/status.rs @ 48744:6e930bc45aeb

rust: remove unused `StatusError::IO` enum variant All `io::Error` cases are now handled through PatternFileWarning or BadMatch Differential Revision: https://phab.mercurial-scm.org/D12174
author Simon Sapin <simon.sapin@octobus.net>
date Mon, 14 Feb 2022 18:51:43 +0100
parents 473af5cbc209
children dd6b67d5c256
comparison
equal deleted inserted replaced
48738:00efd2d5037d 48744:6e930bc45aeb
8 //! Bindings for the `hg::status` module provided by the 8 //! Bindings for the `hg::status` module provided by the
9 //! `hg-core` crate. From Python, this will be seen as 9 //! `hg-core` crate. From Python, this will be seen as
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,
17 }; 16 };
18 use hg::dirstate::status::StatusPath; 17 use hg::dirstate::status::StatusPath;
93 let as_string = e.to_string(); 92 let as_string = e.to_string();
94 log::trace!("Rust status fallback: `{}`", &as_string); 93 log::trace!("Rust status fallback: `{}`", &as_string);
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 }
102 100
103 pub fn status_wrapper( 101 pub fn status_wrapper(