fix: Profile select by name is correctly choosing

Closes #100 #96
This commit is contained in:
Luke D. Jones
2021-08-01 00:04:16 +12:00
parent fb124dd228
commit 29c26e8c89
5 changed files with 38 additions and 18 deletions

View File

@@ -6,7 +6,6 @@ use rog_fan_curve::CurveError;
#[derive(Debug)]
pub enum ProfileError {
ParseFanLevel,
MissingProfile(String),
Path(String, std::io::Error),
Read(String, std::io::Error),
Write(String, std::io::Error),
@@ -23,9 +22,6 @@ impl fmt::Display for ProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
ProfileError::ParseFanLevel => write!(f, "Parse profile error"),
ProfileError::MissingProfile(profile) => {
write!(f, "Profile does not exist {}", profile)
}
ProfileError::Path(path, error) => write!(f, "Path {}: {}", path, error),
ProfileError::Read(path, error) => write!(f, "Read {}: {}", path, error),
ProfileError::Write(path, error) => write!(f, "Write {}: {}", path, error),