[Updated] D12174: rust: remove unused `StatusError::IO` enum variant
SimonSapin
phabricator at mercurial-scm.org
Tue Feb 15 09:44:00 UTC 2022
Closed by commit rHG6e930bc45aeb: rust: remove unused `StatusError::IO` enum variant (authored by SimonSapin).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D12174?vs=32173&id=32183
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D12174/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D12174
AFFECTED FILES
rust/hg-core/src/dirstate/status.rs
rust/hg-cpython/src/dirstate/status.rs
CHANGE DETAILS
diff --git a/rust/hg-cpython/src/dirstate/status.rs b/rust/hg-cpython/src/dirstate/status.rs
--- a/rust/hg-cpython/src/dirstate/status.rs
+++ b/rust/hg-cpython/src/dirstate/status.rs
@@ -10,7 +10,6 @@
//! `rustext.dirstate.status`.
use crate::{dirstate::DirstateMap, exceptions::FallbackError};
-use cpython::exc::OSError;
use cpython::{
exc::ValueError, ObjectProtocol, PyBytes, PyErr, PyList, PyObject,
PyResult, PyTuple, Python, PythonObject, ToPyObject,
@@ -95,7 +94,6 @@
PyErr::new::<FallbackError, _>(py, &as_string)
}
- StatusError::IO(e) => PyErr::new::<OSError, _>(py, e.to_string()),
e => PyErr::new::<ValueError, _>(py, e.to_string()),
}
}
diff --git a/rust/hg-core/src/dirstate/status.rs b/rust/hg-core/src/dirstate/status.rs
--- a/rust/hg-core/src/dirstate/status.rs
+++ b/rust/hg-core/src/dirstate/status.rs
@@ -128,8 +128,6 @@
#[derive(Debug, derive_more::From)]
pub enum StatusError {
- /// Generic IO error
- IO(std::io::Error),
/// An invalid path that cannot be represented in Mercurial was found
Path(HgPathError),
/// An invalid "ignore" pattern was found
@@ -143,7 +141,6 @@
impl fmt::Display for StatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
- StatusError::IO(error) => error.fmt(f),
StatusError::Path(error) => error.fmt(f),
StatusError::Pattern(error) => error.fmt(f),
StatusError::DirstateV2ParseError(_) => {
To: SimonSapin, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220215/a5ec11c9/attachment-0002.html>
More information about the Mercurial-patches
mailing list