Skip to content

Commit

Permalink
ci(clippy): bump to 1.84
Browse files Browse the repository at this point in the history
- updates the rust version on clippy step to `1.84`
- fixes the found clippy issues
  • Loading branch information
oleonardolima committed Jan 20, 2025
1 parent 5a476fd commit 3dc4dac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions src/socks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>() {
Expand All @@ -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>() {
Expand Down
4 changes: 2 additions & 2 deletions src/socks/v4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down
6 changes: 3 additions & 3 deletions src/socks/v5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ enum Authentication<'a> {
None,
}

impl<'a> Authentication<'a> {
impl Authentication<'_> {
fn id(&self) -> u8 {
match *self {
Authentication::Password { .. } => 2,
Expand Down Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down

0 comments on commit 3dc4dac

Please sign in to comment.