fw-rust: Remove wrap around of values in setup
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
2fe25e584f
commit
eb87f77d0a
1 changed files with 4 additions and 4 deletions
|
@ -35,7 +35,7 @@ impl Setup {
|
|||
Selection::BacklightEdit => match input {
|
||||
Input::Next => {
|
||||
self.backlight = if self.backlight == u8::MAX {
|
||||
u8::MIN
|
||||
u8::MAX
|
||||
} else {
|
||||
self.backlight + 1
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ impl Setup {
|
|||
}
|
||||
Input::Previous => {
|
||||
self.backlight = if self.backlight == u8::MIN {
|
||||
u8::MAX
|
||||
u8::MIN
|
||||
} else {
|
||||
self.backlight - 1
|
||||
};
|
||||
|
@ -70,7 +70,7 @@ impl Setup {
|
|||
Selection::ContrastEdit => match input {
|
||||
Input::Next => {
|
||||
self.contrast = if self.contrast >= 63 {
|
||||
u8::MIN
|
||||
63
|
||||
} else {
|
||||
self.contrast + 1
|
||||
};
|
||||
|
@ -79,7 +79,7 @@ impl Setup {
|
|||
}
|
||||
Input::Previous => {
|
||||
self.contrast = if self.contrast == u8::MIN {
|
||||
63
|
||||
u8::MIN
|
||||
} else {
|
||||
self.contrast - 1
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue