Large code cleanup

This commit is contained in:
Luke
2021-02-06 23:18:01 +13:00
parent 39bbe33831
commit 629bdc2213
25 changed files with 124 additions and 287 deletions

View File

@@ -101,7 +101,7 @@ impl CtrlCharge {
}
pub(super) fn set(&self, limit: u8, config: &mut Config) -> Result<(), RogError> {
if limit < 20 || limit > 100 {
if !(20..=100).contains(&limit) {
warn!(
"Unable to set battery charge limit, must be between 20-100: requested {}",
limit