mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-13 01:41:59 -04:00
Run cargo fmt
This commit is contained in:
parent
98f402c33c
commit
8769298416
2 changed files with 17 additions and 5 deletions
|
@ -202,8 +202,14 @@ mod test {
|
|||
1: u32 = Supported,
|
||||
});
|
||||
assert!(HardwareCurrentlySupported::try_from(2).is_err());
|
||||
assert_eq!(HardwareCurrentlySupported::Unsupported.to_string(), "Unsupported");
|
||||
assert_eq!(HardwareCurrentlySupported::Supported.to_string(), "Supported");
|
||||
assert_eq!(
|
||||
HardwareCurrentlySupported::Unsupported.to_string(),
|
||||
"Unsupported"
|
||||
);
|
||||
assert_eq!(
|
||||
HardwareCurrentlySupported::Supported.to_string(),
|
||||
"Supported"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -214,8 +220,14 @@ mod test {
|
|||
"BIOS": str = Bios,
|
||||
"OS": str = Os,
|
||||
});
|
||||
assert_eq!(FanControlState::from_str("os").unwrap(), FanControlState::Os);
|
||||
assert_eq!(FanControlState::from_str("bios").unwrap(), FanControlState::Bios);
|
||||
assert_eq!(
|
||||
FanControlState::from_str("os").unwrap(),
|
||||
FanControlState::Os
|
||||
);
|
||||
assert_eq!(
|
||||
FanControlState::from_str("bios").unwrap(),
|
||||
FanControlState::Bios
|
||||
);
|
||||
assert!(FanControlState::try_from(2).is_err());
|
||||
assert!(FanControlState::from_str("on").is_err());
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ macro_rules! enum_on_off {
|
|||
assert_eq!($enum::from_str("disable").unwrap(), $enum::$off);
|
||||
assert_eq!($enum::from_str("disabled").unwrap(), $enum::$off);
|
||||
assert_eq!($enum::from_str("0").unwrap(), $enum::$off);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
pub fn start() -> TestHandle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue