mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Strongly type the Led brightness
This commit is contained in:
@@ -7,14 +7,14 @@ use std::str::FromStr;
|
||||
|
||||
#[derive(Options)]
|
||||
pub struct LedBrightness {
|
||||
level: Option<u8>,
|
||||
level: Option<u32>,
|
||||
}
|
||||
impl LedBrightness {
|
||||
pub fn new(level: Option<u8>) -> Self {
|
||||
pub fn new(level: Option<u32>) -> Self {
|
||||
LedBrightness { level }
|
||||
}
|
||||
|
||||
pub fn level(&self) -> Option<u8> {
|
||||
pub fn level(&self) -> Option<u32> {
|
||||
self.level
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user