use thiserror::Error;
#[derive(Error, Debug, Clone, Copy)]
#[error("Item not found")]
pub struct NotFoundError;
#[derive(Debug, Clone, Copy, Error, PartialEq)]
pub enum ToxicUpdateError {
#[error("Toxic not found")]
NotFound,
#[error("Other error")]
Other,
}
impl From<NotFoundError> for ToxicUpdateError {
fn from(_: NotFoundError) -> Self {
ToxicUpdateError::NotFound
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_not_found() {
let input = NotFoundError;
let _err: ToxicUpdateError = input.into();
}
}