Remove generic arguments for read and write buffer. #178
Annotations
14 warnings
Build and test
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v2. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
|
useless conversion to the same type: `SerialPort`:
src/bus/mod.rs#L84
warning: useless conversion to the same type: `SerialPort`
--> src/bus/mod.rs:84:17
|
84 | serial_port: serial_port.into(),
| ^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `serial_port`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
deref on an immutable reference:
src/bus/buffer.rs#L109
warning: deref on an immutable reference
--> src/bus/buffer.rs:109:3
|
109 | &*self
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
= note: `#[warn(clippy::borrow_deref_ref)]` on by default
help: if you would like to reborrow, try removing `&*`
|
109 | self
|
help: if you would like to deref, try using `&**`
|
109 | &**self
|
|
deref which would be done by auto-deref:
src/bus/buffer.rs#L102
warning: deref which would be done by auto-deref
--> src/bus/buffer.rs:102:30
|
102 | BufferInner::BoxDyn(x) => &mut **x,
| ^^^^^^^^ help: try: `x`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
|
deref which would be done by auto-deref:
src/bus/buffer.rs#L90
warning: deref which would be done by auto-deref
--> src/bus/buffer.rs:90:30
|
90 | BufferInner::BoxDyn(x) => &**x,
| ^^^^ help: try: `x`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
|
struct `Buffer` has a public `len` method, but no `is_empty` method:
src/bus/buffer.rs#L37
warning: struct `Buffer` has a public `len` method, but no `is_empty` method
--> src/bus/buffer.rs:37:2
|
37 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
= note: `#[warn(clippy::len_without_is_empty)]` on by default
|
very complex type used. Consider factoring parts into `type` definitions:
src/instructions/ping.rs#L57
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/instructions/ping.rs:57:28
|
57 | pub fn scan(&mut self) -> Result<Vec<Result<Response<Ping>, ReadError<SerialPort::Error>>>, crate::WriteError<SerialPort::Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
useless conversion to the same type: `SerialPort`:
src/bus/mod.rs#L84
warning: useless conversion to the same type: `SerialPort`
--> src/bus/mod.rs:84:17
|
84 | serial_port: serial_port.into(),
| ^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `serial_port`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
deref on an immutable reference:
src/bus/buffer.rs#L109
warning: deref on an immutable reference
--> src/bus/buffer.rs:109:3
|
109 | &*self
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
= note: `#[warn(clippy::borrow_deref_ref)]` on by default
help: if you would like to reborrow, try removing `&*`
|
109 | self
|
help: if you would like to deref, try using `&**`
|
109 | &**self
|
|
deref which would be done by auto-deref:
src/bus/buffer.rs#L102
warning: deref which would be done by auto-deref
--> src/bus/buffer.rs:102:30
|
102 | BufferInner::BoxDyn(x) => &mut **x,
| ^^^^^^^^ help: try: `x`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
|
deref which would be done by auto-deref:
src/bus/buffer.rs#L90
warning: deref which would be done by auto-deref
--> src/bus/buffer.rs:90:30
|
90 | BufferInner::BoxDyn(x) => &**x,
| ^^^^ help: try: `x`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
|
struct `Buffer` has a public `len` method, but no `is_empty` method:
src/bus/buffer.rs#L37
warning: struct `Buffer` has a public `len` method, but no `is_empty` method
--> src/bus/buffer.rs:37:2
|
37 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
= note: `#[warn(clippy::len_without_is_empty)]` on by default
|
very complex type used. Consider factoring parts into `type` definitions:
src/instructions/ping.rs#L57
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/instructions/ping.rs:57:28
|
57 | pub fn scan(&mut self) -> Result<Vec<Result<Response<Ping>, ReadError<SerialPort::Error>>>, crate::WriteError<SerialPort::Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
Build and test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|