Skip to content

Commit

Permalink
fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq committed May 15, 2024
1 parent a0c4c11 commit 7eae39a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 1 addition & 6 deletions g3proxy/src/inspect/smtp/initiation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,7 @@ impl Initiation {
.await?;

if rsp.code() == ReplyCode::OK {
if rsp.is_first_line() {
clt_w
.write_all(line)
.await
.map_err(ServerTaskError::ClientTcpWriteFailed)?;
} else if self.allow_extension(msg) {
if rsp.is_first_line() || self.allow_extension(msg) {
clt_w
.write_all(line)
.await
Expand Down
2 changes: 0 additions & 2 deletions lib/g3-io-ext/src/udp/ext/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ mod tests {
assert_eq!(hdr_v[1].n_recv, msg_2.len());
assert_eq!(hdr_v[1].addr(), Some(c_addr));

drop(hdr_v);
assert_eq!(&recv_msg1[..msg_1.len()], msg_1);
assert_eq!(&recv_msg2[..msg_2.len()], msg_2);
}
Expand Down Expand Up @@ -499,7 +498,6 @@ mod tests {
assert_eq!(hdr_v[0].n_recv, msg_1.len());
assert_eq!(hdr_v[0].addr(), Some(c_addr));

drop(hdr_v);
assert_eq!(&recv_msg1[..msg_1.len()], msg_1);

let mut recv_msg2 = [0u8; 16];
Expand Down

0 comments on commit 7eae39a

Please sign in to comment.