mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-12 17:32:21 -04:00
Kill UnsupportedFeature
This commit is contained in:
parent
ffebee0930
commit
452690adee
4 changed files with 16 additions and 59 deletions
|
@ -26,7 +26,6 @@ pub enum HardwareVariant {
|
|||
#[derive(PartialEq, Debug, Copy, Clone)]
|
||||
#[repr(u32)]
|
||||
pub enum HardwareCurrentlySupported {
|
||||
UnsupportedFeature = 0,
|
||||
Unsupported = 1,
|
||||
Supported = 2,
|
||||
}
|
||||
|
@ -46,9 +45,6 @@ impl TryFrom<u32> for HardwareCurrentlySupported {
|
|||
type Error = &'static str;
|
||||
fn try_from(v: u32) -> Result<Self, Self::Error> {
|
||||
match v {
|
||||
x if x == HardwareCurrentlySupported::UnsupportedFeature as u32 => {
|
||||
Ok(HardwareCurrentlySupported::UnsupportedFeature)
|
||||
}
|
||||
x if x == HardwareCurrentlySupported::Unsupported as u32 => {
|
||||
Ok(HardwareCurrentlySupported::Unsupported)
|
||||
}
|
||||
|
@ -63,7 +59,6 @@ impl TryFrom<u32> for HardwareCurrentlySupported {
|
|||
impl fmt::Display for HardwareCurrentlySupported {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
HardwareCurrentlySupported::UnsupportedFeature => write!(f, "Unsupported feature"),
|
||||
HardwareCurrentlySupported::Unsupported => write!(f, "Unsupported"),
|
||||
HardwareCurrentlySupported::Supported => write!(f, "Supported"),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue