Tiny clippy (#2525)

This commit is contained in:
Dominik Maier 2024-09-16 12:21:58 +02:00 committed by GitHub
parent 71ed5c7227
commit a168d76b14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,6 @@
#[allow(clippy::collapsible_if)]
pub fn do_thing(data: &[u8]) { pub fn do_thing(data: &[u8]) {
if data.get(0) == Some(&b'a') { if data.first() == Some(&b'a') {
if data.get(1) == Some(&b'b') { if data.get(1) == Some(&b'b') {
if data.get(2) == Some(&b'c') { if data.get(2) == Some(&b'c') {
if data.get(3) == Some(&b'd') { if data.get(3) == Some(&b'd') {