Add usage warnings to mfio-netfs #41
clippy
10 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 10 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.74.0 (79e9716c9 2023-11-13)
- cargo 1.74.0 (ecb9851af 2023-10-18)
- clippy 0.1.74 (79e9716 2023-11-13)
Annotations
Check warning on line 44 in mfio-rt/src/util.rs
github-actions / clippy
redundant guard
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
Check warning on line 43 in mfio-rt/src/util.rs
github-actions / clippy
redundant guard
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
Check warning on line 116 in mfio-rt/src/native/impls/io_uring/tcp_stream.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:116:71
|
116 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^ help: try: `*IOV_MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 116 in mfio-rt/src/native/impls/io_uring/tcp_stream.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:116:49
|
116 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `queue.len()`
|
= 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
Check warning on line 371 in mfio-netfs/src/net/server.rs
github-actions / clippy
this `RefCell` reference is held across an `await` point
warning: this `RefCell` reference is held across an `await` point
--> mfio-netfs/src/net/server.rs:371:41
|
371 | ... read_dir_streams.borrow().get(stream_id as usize)
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: ensure the reference is dropped before calling `await`
note: these are all the `await` points this reference is held through
--> mfio-netfs/src/net/server.rs:373:78
|
373 | ... let stream_buf = &mut *stream.lock().await;
| ^^^^^
...
383 | ... .await;
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_refcell_ref
= note: `#[warn(clippy::await_holding_refcell_ref)]` on by default
Check warning on line 371 in mfio-netfs/src/net/server.rs
github-actions / clippy
this `RefCell` reference is held across an `await` point
warning: this `RefCell` reference is held across an `await` point
--> mfio-netfs/src/net/server.rs:371:41
|
371 | ... read_dir_streams.borrow().get(stream_id as usize)
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: ensure the reference is dropped before calling `await`
note: these are all the `await` points this reference is held through
--> mfio-netfs/src/net/server.rs:373:78
|
373 | ... let stream_buf = &mut *stream.lock().await;
| ^^^^^
...
383 | ... .await;
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_refcell_ref
= note: `#[warn(clippy::await_holding_refcell_ref)]` on by default
Check warning on line 44 in mfio-rt/src/util.rs
github-actions / clippy
redundant guard
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
Check warning on line 43 in mfio-rt/src/util.rs
github-actions / clippy
redundant guard
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
Check warning on line 116 in mfio-rt/src/native/impls/io_uring/tcp_stream.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:116:71
|
116 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^ help: try: `*IOV_MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 116 in mfio-rt/src/native/impls/io_uring/tcp_stream.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:116:49
|
116 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `queue.len()`
|
= 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