Skip to content

semihosting: add Safety docstring to syscall #674

semihosting: add Safety docstring to syscall

semihosting: add Safety docstring to syscall #674

GitHub Actions / clippy succeeded Oct 29, 2023 in 0s

clippy

6 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 6
Note 0
Help 0

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check warning on line 35 in cortex-m-semihosting/src/hio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this returns a `Result<_, ()>`

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

Check warning on line 26 in cortex-m-semihosting/src/hio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this returns a `Result<_, ()>`

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

Check warning on line 14 in cortex-m-semihosting/src/hio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this returns a `Result<_, ()>`

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

Check warning on line 12 in cortex-m-semihosting/src/debug.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

needless `fn main` in doctest

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

Check warning on line 755 in cortex-m/src/peripheral/scb.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual slice size calculation

warning: manual slice size calculation
   --> cortex-m/src/peripheral/scb.rs:755:13
    |
755 |             slice.len() * core::mem::size_of::<T>(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::mem::size_of_val(slice)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation

Check warning on line 669 in cortex-m/src/peripheral/scb.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual slice size calculation

warning: manual slice size calculation
   --> cortex-m/src/peripheral/scb.rs:669:13
    |
669 |             slice.len() * core::mem::size_of::<T>(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::mem::size_of_val(slice)`
    |
    = 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