Skip to content

Clippy check

Clippy check #640

Triggered via merge group July 12, 2023 06:31
Status Success
Total duration 42s
Artifacts

clippy.yml

on: merge_group
Fit to window
Zoom out
Zoom in

Annotations

24 warnings
the borrowed expression implements the required traits: cortex-m-rt/macros/src/lib.rs#L637
warning: the borrowed expression implements the required traits --> cortex-m-rt/macros/src/lib.rs:637:51 | 637 | return Err(parse::Error::new(attr.span(), &err_str) | ^^^^^^^^ help: change this to: `err_str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
unsafe function's docs miss `# Safety` section: cortex-m-semihosting/src/lib.rs#L194
warning: unsafe function's docs miss `# Safety` section --> cortex-m-semihosting/src/lib.rs:194:1 | 194 | pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
unsafe function's docs miss `# Safety` section: cortex-m-semihosting/src/lib.rs#L188
warning: unsafe function's docs miss `# Safety` section --> cortex-m-semihosting/src/lib.rs:188:1 | 188 | pub unsafe fn syscall<T>(nr: usize, arg: &T) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc = note: `#[warn(clippy::missing_safety_doc)]` on by default
this returns a `Result<_, ()>`: cortex-m-semihosting/src/hio.rs#L35
warning: this returns a `Result<_, ()>` --> cortex-m-semihosting/src/hio.rs:35:1 | 35 | pub fn hstdout() -> Result<HostStream, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
this returns a `Result<_, ()>`: cortex-m-semihosting/src/hio.rs#L26
warning: this returns a `Result<_, ()>` --> cortex-m-semihosting/src/hio.rs:26:1 | 26 | pub fn hstderr() -> Result<HostStream, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
this returns a `Result<_, ()>`: cortex-m-semihosting/src/hio.rs#L14
warning: this returns a `Result<_, ()>` --> cortex-m-semihosting/src/hio.rs:14:5 | 14 | pub fn write_all(&mut self, buffer: &[u8]) -> Result<(), ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err = note: `#[warn(clippy::result_unit_err)]` on by default
needless `fn main` in doctest: cortex-m-semihosting/src/debug.rs#L12
warning: needless `fn main` in doctest --> cortex-m-semihosting/src/debug.rs:12:4 | 12 | //! use cortex_m_semihosting::debug::{self, EXIT_SUCCESS, EXIT_FAILURE}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main = note: `#[warn(clippy::needless_doctest_main)]` on by default
manual slice size calculation: src/peripheral/scb.rs#L755
warning: manual slice size calculation --> src/peripheral/scb.rs:755:13 | 755 | slice.len() * core::mem::size_of::<T>(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using std::mem::size_of_value instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation
manual slice size calculation: src/peripheral/scb.rs#L669
warning: manual slice size calculation --> src/peripheral/scb.rs:669:13 | 669 | slice.len() * core::mem::size_of::<T>(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using std::mem::size_of_value instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default
the borrowed expression implements the required traits: cortex-m-rt/macros/src/lib.rs#L637
warning: the borrowed expression implements the required traits --> cortex-m-rt/macros/src/lib.rs:637:51 | 637 | return Err(parse::Error::new(attr.span(), &err_str) | ^^^^^^^^ help: change this to: `err_str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
the borrowed expression implements the required traits: cortex-m-rt/macros/src/lib.rs#L637
warning: the borrowed expression implements the required traits --> cortex-m-rt/macros/src/lib.rs:637:51 | 637 | return Err(parse::Error::new(attr.span(), &err_str) | ^^^^^^^^ help: change this to: `err_str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
unsafe function's docs miss `# Safety` section: cortex-m-semihosting/src/lib.rs#L194
warning: unsafe function's docs miss `# Safety` section --> cortex-m-semihosting/src/lib.rs:194:1 | 194 | pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
unsafe function's docs miss `# Safety` section: cortex-m-semihosting/src/lib.rs#L188
warning: unsafe function's docs miss `# Safety` section --> cortex-m-semihosting/src/lib.rs:188:1 | 188 | pub unsafe fn syscall<T>(nr: usize, arg: &T) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc = note: `#[warn(clippy::missing_safety_doc)]` on by default
this returns a `Result<_, ()>`: cortex-m-semihosting/src/hio.rs#L35
warning: this returns a `Result<_, ()>` --> cortex-m-semihosting/src/hio.rs:35:1 | 35 | pub fn hstdout() -> Result<HostStream, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
this returns a `Result<_, ()>`: cortex-m-semihosting/src/hio.rs#L26
warning: this returns a `Result<_, ()>` --> cortex-m-semihosting/src/hio.rs:26:1 | 26 | pub fn hstderr() -> Result<HostStream, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
this returns a `Result<_, ()>`: cortex-m-semihosting/src/hio.rs#L14
warning: this returns a `Result<_, ()>` --> cortex-m-semihosting/src/hio.rs:14:5 | 14 | pub fn write_all(&mut self, buffer: &[u8]) -> Result<(), ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err = note: `#[warn(clippy::result_unit_err)]` on by default
needless `fn main` in doctest: cortex-m-semihosting/src/debug.rs#L12
warning: needless `fn main` in doctest --> cortex-m-semihosting/src/debug.rs:12:4 | 12 | //! use cortex_m_semihosting::debug::{self, EXIT_SUCCESS, EXIT_FAILURE}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main = note: `#[warn(clippy::needless_doctest_main)]` on by default
manual slice size calculation: src/peripheral/scb.rs#L755
warning: manual slice size calculation --> src/peripheral/scb.rs:755:13 | 755 | slice.len() * core::mem::size_of::<T>(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using std::mem::size_of_value instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation
manual slice size calculation: src/peripheral/scb.rs#L669
warning: manual slice size calculation --> src/peripheral/scb.rs:669:13 | 669 | slice.len() * core::mem::size_of::<T>(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using std::mem::size_of_value instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default
the borrowed expression implements the required traits: cortex-m-rt/macros/src/lib.rs#L637
warning: the borrowed expression implements the required traits --> cortex-m-rt/macros/src/lib.rs:637:51 | 637 | return Err(parse::Error::new(attr.span(), &err_str) | ^^^^^^^^ help: change this to: `err_str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default