Skip to content

Commit debdc36

Browse files
committed
Clippy
1 parent 9763cbe commit debdc36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcpwm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ impl<U: Unit> Mcpwm<U> {
356356
let operator_input_frequency =
357357
MAX_PWM_TIMER_PRESCALE * MAX_PWM_TIMER_PERIOD * u32::from(lowest_frequency);
358358
let group_pre_scale = MCPWM_CLOCK_SOURCE_FREQUENCY / operator_input_frequency;
359-
if group_pre_scale > 256 || group_pre_scale < 1 {
359+
if !(1..=256).contains(&group_pre_scale) {
360360
return Err(EspError::from(ESP_ERR_INVALID_ARG).unwrap());
361361
}
362362

0 commit comments

Comments
 (0)