Skip to content

chore: fixed warning when building with no-default-feature #176

chore: fixed warning when building with no-default-feature

chore: fixed warning when building with no-default-feature #176

GitHub Actions / clippy ubuntu-latest succeeded Nov 28, 2024 in 0s

clippy ubuntu-latest

2 warnings

Details

Results

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

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 99 in crates/shadowsocks-service/src/local/tun/virt_device.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> crates/shadowsocks-service/src/local/tun/virt_device.rs:99:6
   |
99 | impl<'a> phy::TxToken for VirtTxToken<'a> {
   |      ^^                               ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
   |
99 - impl<'a> phy::TxToken for VirtTxToken<'a> {
99 + impl phy::TxToken for VirtTxToken<'_> {
   |

Check warning on line 75 in crates/shadowsocks-service/src/local/tun/virt_device.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

unneeded `return` statement

warning: unneeded `return` statement
  --> crates/shadowsocks-service/src/local/tun/virt_device.rs:75:9
   |
75 |         return Some(VirtTxToken(self));
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
   = note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
   |
75 -         return Some(VirtTxToken(self));
75 +         Some(VirtTxToken(self))
   |