Skip to content

Commit 2dc3bb3

Browse files
authored
Fix clippy (#314)
* fix clippy * fix kunit * fix workflow name
1 parent b5730b7 commit 2dc3bb3

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
branches: [ master ]
99

1010
jobs:
11-
build-test:
11+
lint:
1212
runs-on: ubuntu-latest
1313

1414
steps:

libkernel/src/fs/filesystems/fat32/fat.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ impl Fat {
8989
dev.read_at(bpb.sector_offset(sec), &mut buf).await?;
9090

9191
fat.extend(
92-
buf.chunks_exact(4)
93-
.map(|chunk| u32::from_le_bytes(chunk.try_into().unwrap()))
92+
buf.as_chunks::<4>()
93+
.0
94+
.iter()
95+
.map(|chunk| u32::from_le_bytes(*chunk))
9496
.map(|v| v.into()),
9597
);
9698
}

src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_main]
33
#![feature(used_with_arg)]
44
#![feature(likely_unlikely)]
5-
#![feature(box_as_ptr)]
65
#![allow(internal_features)]
76
#![cfg_attr(test, feature(core_intrinsics))]
87
#![feature(custom_test_frameworks)]

src/testing/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ macro_rules! ktest_impl {
8484
)
8585
};
8686
match result {
87-
0 => crate::testing::TestResult::Ok,
88-
1 => crate::testing::TestResult::Failed,
89-
_ => unreachable!("catch_unwind should only return 0 or 1"),
87+
false => crate::testing::TestResult::Ok,
88+
true => crate::testing::TestResult::Failed,
9089
}
9190
},
9291
};

0 commit comments

Comments
 (0)