ci(clippy): bump to 1.84
- updates the rust version on clippy step to `1.84` - fixes the found clippy issues
This commit is contained in:
parent
5a476fdfd9
commit
3dc4daceaf
3
.github/workflows/cont_integration.yml
vendored
3
.github/workflows/cont_integration.yml
vendored
@ -57,12 +57,13 @@ jobs:
|
||||
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check
|
||||
|
||||
clippy_check:
|
||||
name: Rust clippy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: 1.78.0
|
||||
toolchain: 1.84.0
|
||||
components: clippy
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2.2.1
|
||||
|
||||
@ -99,7 +99,7 @@ impl ToTargetAddr for (Ipv6Addr, u16) {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> ToTargetAddr for (&'a str, u16) {
|
||||
impl ToTargetAddr for (&str, u16) {
|
||||
fn to_target_addr(&self) -> io::Result<TargetAddr> {
|
||||
// try to parse as an IP first
|
||||
if let Ok(addr) = self.0.parse::<Ipv4Addr>() {
|
||||
@ -114,7 +114,7 @@ impl<'a> ToTargetAddr for (&'a str, u16) {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> ToTargetAddr for &'a str {
|
||||
impl ToTargetAddr for &str {
|
||||
fn to_target_addr(&self) -> io::Result<TargetAddr> {
|
||||
// try to parse as an IP first
|
||||
if let Ok(addr) = self.parse::<SocketAddrV4>() {
|
||||
|
||||
@ -148,7 +148,7 @@ impl Read for Socks4Stream {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Read for &'a Socks4Stream {
|
||||
impl Read for &Socks4Stream {
|
||||
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||
(&self.socket).read(buf)
|
||||
}
|
||||
@ -164,7 +164,7 @@ impl Write for Socks4Stream {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Write for &'a Socks4Stream {
|
||||
impl Write for &Socks4Stream {
|
||||
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||
(&self.socket).write(buf)
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ enum Authentication<'a> {
|
||||
None,
|
||||
}
|
||||
|
||||
impl<'a> Authentication<'a> {
|
||||
impl Authentication<'_> {
|
||||
fn id(&self) -> u8 {
|
||||
match *self {
|
||||
Authentication::Password { .. } => 2,
|
||||
@ -329,7 +329,7 @@ impl Read for Socks5Stream {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Read for &'a Socks5Stream {
|
||||
impl Read for &Socks5Stream {
|
||||
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||
(&self.socket).read(buf)
|
||||
}
|
||||
@ -345,7 +345,7 @@ impl Write for Socks5Stream {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Write for &'a Socks5Stream {
|
||||
impl Write for &Socks5Stream {
|
||||
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||
(&self.socket).write(buf)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user