Skip to content

Commit c09f694

Browse files
committed
ci and clippy
1 parent d89630c commit c09f694

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ jobs:
5656
sudo apt update
5757
sudo apt install qemu-system-arm
5858
- run: qemu-system-arm --version
59-
- run: cargo +nightly run --target thumbv7m-none-eabi --example llff_integration_test --all-features
60-
- run: cargo +nightly run --target thumbv7m-none-eabi --example tlsf_integration_test --all-features
59+
- run: cargo +nightly run --target thumbv7em-none-eabihf --example llff_integration_test --all-features
60+
- run: cargo +nightly run --target thumbv7em-none-eabihf --example tlsf_integration_test --all-features
6161

6262
clippy:
6363
name: Clippy

examples/llff_integration_test.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818

1919
extern crate alloc;
2020

21-
use defmt_semihosting as _;
2221
use alloc::vec::Vec;
23-
use core::{mem::{MaybeUninit, size_of}, panic::PanicInfo};
24-
use cortex_m_rt::entry;
22+
use core::{
23+
mem::{size_of, MaybeUninit},
24+
panic::PanicInfo,
25+
};
2526
use cortex_m as _;
27+
use cortex_m_rt::entry;
28+
use defmt_semihosting as _;
2629
use embedded_alloc::LlffHeap as Heap;
2730

2831
#[global_allocator]
@@ -61,13 +64,15 @@ fn test_allocator_api() {
6164
assert_eq!(v.as_slice(), &[0xCAFE, 0xDEAD, 0xFEED]);
6265
}
6366

67+
pub type TestTable<'a> = &'a [(fn() -> (), &'static str)];
68+
6469
#[entry]
6570
fn main() -> ! {
6671
unsafe {
6772
embedded_alloc::init!(HEAP, 1024);
6873
}
6974

70-
let tests: &[(fn() -> (), &'static str)] = &[
75+
let tests: TestTable = &[
7176
(test_global_heap, "test_global_heap"),
7277
(test_allocator_api, "test_allocator_api"),
7378
];

examples/tlsf_integration_test.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ use defmt_semihosting as _;
2121

2222
use alloc::collections::LinkedList;
2323
use core::{mem::MaybeUninit, panic::PanicInfo};
24-
use cortex_m_rt::entry;
2524
use cortex_m as _;
25+
use cortex_m_rt::entry;
2626
use embedded_alloc::TlsfHeap as Heap;
2727

2828
#[global_allocator]
2929
static HEAP: Heap = Heap::empty();
3030
const HEAP_SIZE: usize = 30 * 1024;
3131

32+
pub type TestTable<'a> = &'a [(fn() -> (), &'static str)];
33+
3234
fn test_global_heap() {
3335
const ELEMS: usize = 250;
3436

@@ -85,8 +87,7 @@ fn main() -> ! {
8587
embedded_alloc::init!(HEAP, HEAP_SIZE);
8688
}
8789

88-
#[allow(clippy::type_complexity)]
89-
let tests: &[(fn() -> (), &'static str)] = &[
90+
let tests: TestTable = &[
9091
(test_global_heap, "test_global_heap"),
9192
(test_allocator_api, "test_allocator_api"),
9293
];

0 commit comments

Comments
 (0)