chore: fixed warning when building with no-default-feature #176
Annotations
4 warnings
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks-service/src/local/tun/virt_device.rs#L99
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<'_> {
|
|
unneeded `return` statement:
crates/shadowsocks-service/src/local/tun/virt_device.rs#L75
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))
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks-service/src/local/tun/virt_device.rs#L99
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<'_> {
|
|
unneeded `return` statement:
crates/shadowsocks-service/src/local/tun/virt_device.rs#L75
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))
|
|