Skip to content

Add futures trait compatibility

Sign in for the full log view
GitHub Actions / clippy succeeded Dec 5, 2023 in 1s

clippy

18 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 18
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 (79e9716c 2023-11-13)

Annotations

Check warning on line 44 in mfio-rt/src/util.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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 55 in mfio/src/stdeq.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary closure used to substitute value for `Option::None`

warning: unnecessary closure used to substitute value for `Option::None`
  --> mfio/src/stdeq.rs:54:17
   |
54 | /                 pos.checked_sub((-val) as u64)
55 | |                     .ok_or_else(|| std::io::ErrorKind::InvalidInput)?
   | |______________________----------------------------------------------^
   |                        |
   |                        help: use `ok_or(..)` instead: `ok_or(std::io::ErrorKind::InvalidInput)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations

Check warning on line 41 in mfio/src/stdeq.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary closure used to substitute value for `Option::None`

warning: unnecessary closure used to substitute value for `Option::None`
  --> mfio/src/stdeq.rs:40:21
   |
40 | /                     end.checked_sub((-val) as u64)
41 | |                         .ok_or_else(|| std::io::ErrorKind::InvalidInput)?
   | |__________________________----------------------------------------------^
   |                            |
   |                            help: use `ok_or(..)` instead: `ok_or(std::io::ErrorKind::InvalidInput)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
   = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default

Check warning on line 59 in mfio/src/futures_compat.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this lifetime isn't used in the impl

warning: this lifetime isn't used in the impl
  --> mfio/src/futures_compat.rs:59:6
   |
59 | impl<'a, Io: ?Sized + stdeq::StreamPos<u64>> FuturesCompat for Io {}
   |      ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
   = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default

Check warning on line 128 in mfio-rt/src/util.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

associated function `null` is never used

warning: associated function `null` is never used
   --> mfio-rt/src/util.rs:128:12
    |
127 | impl RawBox {
    | ----------- associated function in this implementation
128 |     pub fn null() -> Self {
    |            ^^^^

Check warning on line 19 in mfio-rt/src/native/impls/unix_extra.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `new_socket` is never used

warning: function `new_socket` is never used
  --> mfio-rt/src/native/impls/unix_extra.rs:19:15
   |
19 | pub(crate) fn new_socket(
   |               ^^^^^^^^^^

Check warning on line 7 in mfio-rt/src/native/impls/unix_extra.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `new_for_addr` is never used

warning: function `new_for_addr` is never used
 --> mfio-rt/src/native/impls/unix_extra.rs:7:15
  |
7 | pub(crate) fn new_for_addr(
  |               ^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

Check warning on line 371 in mfio-netfs/src/net/server.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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 128 in mfio-rt/src/util.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

associated function `null` is never used

warning: associated function `null` is never used
   --> mfio-rt/src/util.rs:128:12
    |
127 | impl RawBox {
    | ----------- associated function in this implementation
128 |     pub fn null() -> Self {
    |            ^^^^

Check warning on line 19 in mfio-rt/src/native/impls/unix_extra.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `new_socket` is never used

warning: function `new_socket` is never used
  --> mfio-rt/src/native/impls/unix_extra.rs:19:15
   |
19 | pub(crate) fn new_socket(
   |               ^^^^^^^^^^

Check warning on line 7 in mfio-rt/src/native/impls/unix_extra.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `new_for_addr` is never used

warning: function `new_for_addr` is never used
 --> mfio-rt/src/native/impls/unix_extra.rs:7:15
  |
7 | pub(crate) fn new_for_addr(
  |               ^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

Check warning on line 55 in mfio/src/stdeq.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary closure used to substitute value for `Option::None`

warning: unnecessary closure used to substitute value for `Option::None`
  --> mfio/src/stdeq.rs:54:17
   |
54 | /                 pos.checked_sub((-val) as u64)
55 | |                     .ok_or_else(|| std::io::ErrorKind::InvalidInput)?
   | |______________________----------------------------------------------^
   |                        |
   |                        help: use `ok_or(..)` instead: `ok_or(std::io::ErrorKind::InvalidInput)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations

Check warning on line 41 in mfio/src/stdeq.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary closure used to substitute value for `Option::None`

warning: unnecessary closure used to substitute value for `Option::None`
  --> mfio/src/stdeq.rs:40:21
   |
40 | /                     end.checked_sub((-val) as u64)
41 | |                         .ok_or_else(|| std::io::ErrorKind::InvalidInput)?
   | |__________________________----------------------------------------------^
   |                            |
   |                            help: use `ok_or(..)` instead: `ok_or(std::io::ErrorKind::InvalidInput)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
   = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default

Check warning on line 59 in mfio/src/futures_compat.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this lifetime isn't used in the impl

warning: this lifetime isn't used in the impl
  --> mfio/src/futures_compat.rs:59:6
   |
59 | impl<'a, Io: ?Sized + stdeq::StreamPos<u64>> FuturesCompat for Io {}
   |      ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
   = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default