Remove around 14 transitive dependencies

This commit is contained in:
Luke
2020-06-30 20:45:00 +12:00
parent 70a1bc3487
commit 898276494c
7 changed files with 65 additions and 159 deletions

View File

@@ -1,10 +1,16 @@
use std::fmt::Debug;
use thiserror::Error;
use std::fmt;
#[derive(Error, Debug)]
pub enum RogError {
#[error("unable to parse string to fan mode")]
ParseFanLevel,
#[error("mode not supported")]
NotSupported,
}
impl fmt::Display for RogError {
// This trait requires `fmt` with this exact signature.
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
RogError::ParseFanLevel => write!(f, "Parse error"),
RogError::NotSupported => write!(f, "Not supported"),
}
}
}