Refactor and move Linux code to separate branch

This commit is contained in:
a2x
2024-04-03 02:59:30 +11:00
parent 86dc0fa8f6
commit 3a935f5d73
229 changed files with 705 additions and 121739 deletions

View File

@@ -5,23 +5,20 @@ pub enum Error {
#[error(transparent)]
Fmt(#[from] std::fmt::Error),
#[error("index {idx} is out of bounds for array with length {len}")]
IndexOutOfBounds { idx: usize, len: usize },
#[error(transparent)]
Io(#[from] std::io::Error),
#[error(transparent)]
Memflow(#[from] memflow::error::Error),
#[error(transparent)]
Pelite(#[from] pelite::Error),
#[error(transparent)]
Serde(#[from] serde_json::Error),
#[error("unable to parse signature")]
SignatureInvalid,
#[error("unable to find signature for: {0}")]
SignatureNotFound(String),
#[error("index {idx} is out of bounds for array with length {len}")]
OutOfBounds { idx: usize, len: usize },
#[error("{0}")]
Other(&'static str),
@@ -34,11 +31,4 @@ impl<T> From<memflow::error::PartialError<T>> for Error {
}
}
impl From<skidscan::SignatureParseError> for Error {
#[inline]
fn from(_err: skidscan::SignatureParseError) -> Self {
Error::SignatureInvalid
}
}
pub type Result<T> = std::result::Result<T, Error>;