Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Commit 2874dd4

Browse files
authored
Fixes #23 -- verify cargo fmt'ing in CI (#89)
* Fixes #23 -- verify cargo fmt'ing in CI * Ooops, fixed bash * Remove this * Update .travis.yml * consolidate * cargo fmt
1 parent cf1c265 commit 2874dd4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ install:
2727

2828
script:
2929
- ./tests/run_tests.py
30+
- |
31+
for p in . hello-world tests/*; do
32+
if [ -d "$p" ]; then
33+
(cd "$p" && cargo fmt --all -- --check) || exit 1
34+
fi
35+
done
3036
3137
after_failure:
3238
- dmesg

src/allocator.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ unsafe impl GlobalAlloc for KernelAllocator {
1010
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
1111
// krealloc is used instead of kmalloc because kmalloc is an inline function and can't be
1212
// bound to as a result
13-
return bindings::krealloc(
14-
ptr::null(),
15-
layout.size(),
16-
bindings::GFP_KERNEL,
17-
) as *mut u8;
13+
return bindings::krealloc(ptr::null(), layout.size(), bindings::GFP_KERNEL) as *mut u8;
1814
}
1915

2016
unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) {

0 commit comments

Comments
 (0)