chore: clippy fix (#1933)

This commit is contained in:
Aaron Chen
2025-04-06 22:38:10 +08:00
committed by GitHub
parent bc8875fd49
commit 0dbface59a
2 changed files with 3 additions and 7 deletions
-4
View File
@@ -21,10 +21,6 @@ jobs:
- uses: Swatinem/rust-cache@v2
- if: ${{ runner.os == 'Windows' }}
uses: ilammy/setup-nasm@v1
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
run: |
rustup set profile minimal
+3 -3
View File
@@ -478,7 +478,7 @@ fn write_domain_name_address<B: BufMut>(dnaddr: &str, port: u16, buf: &mut B) {
"domain name length must be smaller than 256"
);
buf.put_u8(dnaddr.len() as u8);
buf.put_slice(dnaddr[..].as_bytes());
buf.put_slice(dnaddr.as_bytes());
buf.put_u16(port);
}
@@ -837,7 +837,7 @@ impl UdpAssociateHeader {
}
}
/// Username/Password Authentication Inittial Negociation
/// Username/Password Authentication Initial Negotiation
///
/// https://datatracker.ietf.org/doc/html/rfc1929
///
@@ -880,7 +880,7 @@ impl PasswdAuthRequest {
let mut ver_buf = [0u8; 1];
let _ = r.read_exact(&mut ver_buf).await?;
// The only valid subnegociation version
// The only valid subnegotiation version
if ver_buf[0] != 0x01 {
return Err(Error::UnsupportedPasswdAuthVersion(ver_buf[0]));
}