Skip to content

docs(book): explain concepts required for building a RIOT-rs application #1765

docs(book): explain concepts required for building a RIOT-rs application

docs(book): explain concepts required for building a RIOT-rs application #1765

Triggered via pull request August 8, 2024 09:12
Status Success
Total duration 14m 41s
Artifacts

main.yml

on: pull_request
Matrix: build
Final Results
6s
Final Results
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
casting to the same type is unnecessary (`u32` -> `u32`): src/riot-rs-runqueue/src/runqueue.rs#L102
warning: casting to the same type is unnecessary (`u32` -> `u32`) --> src/riot-rs-runqueue/src/runqueue.rs:102:9 | 102 | (USIZE_BITS as u32 - val.leading_zeros()) as u32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(USIZE_BITS as u32 - val.leading_zeros())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
manual implementation of `Option::map`: src/riot-rs-runqueue/src/runqueue.rs#L115
warning: manual implementation of `Option::map` --> src/riot-rs-runqueue/src/runqueue.rs:115:9 | 115 | / match self.queues.peek_head(rq.0) { 116 | | Some(id) => Some(ThreadId::new(id)), 117 | | None => None, 118 | | } | |_________^ help: try: `self.queues.peek_head(rq.0).map(ThreadId::new)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map = note: `#[warn(clippy::manual_map)]` on by default
field `sp` is never read: src/riot-rs-threads/src/thread.rs#L7
warning: field `sp` is never read --> src/riot-rs-threads/src/thread.rs:7:9 | 5 | pub struct Thread { | ------ field in this struct 6 | /// Saved stack pointer after context switch. 7 | pub sp: usize, | ^^ | = note: `Thread` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default
unused macro definition: `impl_from_level`: src/riot-rs-embassy/src/gpio.rs#L218
warning: unused macro definition: `impl_from_level` --> src/riot-rs-embassy/src/gpio.rs:218:14 | 218 | macro_rules! impl_from_level { | ^^^^^^^^^^^^^^^ | = note: `#[warn(unused_macros)]` on by default
unused import: `impl_from_level`: src/riot-rs-embassy/src/gpio.rs#L230
warning: unused import: `impl_from_level` --> src/riot-rs-embassy/src/gpio.rs:230:16 | 230 | pub(crate) use impl_from_level; | ^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unreachable definition: src/riot-rs-embassy/src/gpio.rs#L578
warning: unreachable definition --> src/riot-rs-embassy/src/gpio.rs:578:17 | 576 | let speed = <ArchSpeed as FromSpeed>::from(self.speed); | ------------------------------------------ any code following this expression is unreachable 577 | 578 | let output = | ^^^^^^ unreachable definition | note: this expression has type `arch::gpio::output::Speed`, which is uninhabited --> src/riot-rs-embassy/src/gpio.rs:576:25 | 576 | let speed = <ArchSpeed as FromSpeed>::from(self.speed); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: `#[warn(unreachable_code)]` on by default
unreachable definition: src/riot-rs-embassy/src/gpio.rs#L576
warning: unreachable definition --> src/riot-rs-embassy/src/gpio.rs:576:17 | 574 | <ArchDriveStrength as FromDriveStrength>::from(self.drive_strength); | ------------------------------------------------------------------- any code following this expression is unreachable 575 | // TODO: should we move this into `output::new()`s? 576 | let speed = <ArchSpeed as FromSpeed>::from(self.speed); | ^^^^^ unreachable definition | note: this expression has type `arch::gpio::output::DriveStrength`, which is uninhabited --> src/riot-rs-embassy/src/gpio.rs:574:17 | 574 | <ArchDriveStrength as FromDriveStrength>::from(self.drive_strength); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused variable: `drive_strength`: src/riot-rs-embassy/src/gpio.rs#L573
warning: unused variable: `drive_strength` --> src/riot-rs-embassy/src/gpio.rs:573:17 | 573 | let drive_strength = | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_drive_strength` | = note: `#[warn(unused_variables)]` on by default
unused variable: `speed`: src/riot-rs-embassy/src/gpio.rs#L576
warning: unused variable: `speed` --> src/riot-rs-embassy/src/gpio.rs:576:17 | 576 | let speed = <ArchSpeed as FromSpeed>::from(self.speed); | ^^^^^ help: if this is intentional, prefix it with an underscore: `_speed`
`assert!(false, ..)` should probably be replaced: src/riot-rs-embassy/src/gpio.rs#L261
warning: `assert!(false, ..)` should probably be replaced --> src/riot-rs-embassy/src/gpio.rs:261:17 | 261 | / assert!( 262 | | arch::gpio::input::SCHMITT_TRIGGER_CONFIGURABLE, 263 | | "This architecture does not support configuring Schmitt triggers on GPIO inputs." 264 | | ); | |_________________^ | = help: use `panic!(..)` or `unreachable!(..)` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants = note: `#[warn(clippy::assertions_on_constants)]` on by default