Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Aug 2, 2023
1 parent 9a8f51e commit 29806af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ impl Dma {
Dma::Channel1(size) | Dma::Channel2(size) | Dma::Auto(size) => *size,
};
match max_transfer_size {
0 => panic!("The max transfer size must be greater than 0"),
x if x % 4 != 0 => panic!("The max transfer size must be a multiple of 4"),
x if x == 0 => panic!("The max transfer size must be greater than 0"),
x if x > 4096 => panic!("The max transfer size must be less than or equal to 4096"),
_ => max_transfer_size,
}
Expand Down

0 comments on commit 29806af

Please sign in to comment.