- Remove unused imports (Filter, Digest, Resource, etc.) - Prefix unused variables with underscore (_pk, _size) - Fix snake_case naming for local variables - Remove unused ArgumentError enum in pmoupnp - Apply cargo fix suggestions for unused imports Remaining warnings are async_fn_in_trait style warnings which would require API breaking changes to address.
20 lines
420 B
Rust
20 lines
420 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum ActionError {
|
|
#[error("Action error: {0}")]
|
|
GeneralError(String),
|
|
|
|
#[error("Argument error: {0}")]
|
|
ArgumentError(String),
|
|
|
|
#[error("Set operation error: {0}")]
|
|
SetError(String),
|
|
}
|
|
|
|
impl From<std::io::Error> for ActionError {
|
|
fn from(err: std::io::Error) -> Self {
|
|
ActionError::GeneralError(format!("IO error: {}", err))
|
|
}
|
|
}
|