Skip to content

Commit ca42342

Browse files
IshanGrover2004steel-bucket
authored andcommitted
chore(clippy): Fix clippy warnings
1 parent 6ef8413 commit ca42342

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/rust/lib_ccxr/src/net/block.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,8 @@ pub trait BlockStream {
250250
return Ok(false);
251251
}
252252

253-
if data.len() > 0 {
254-
if self.send(data)? != data.len() {
255-
return Ok(false);
256-
}
253+
if data.len() > 0 && self.send(data)? != data.len() {
254+
return Ok(false);
257255
}
258256

259257
if self.send(END_MARKER.as_bytes())? != END_MARKER.len() {

src/rust/lib_ccxr/src/net/target.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl<'a> SendTarget<'a> {
114114
info!(
115115
"Connected to {}:{}\n",
116116
send_target.config.target_addr,
117-
send_target.config.port.unwrap_or_else(|| DEFAULT_TCP_PORT)
117+
send_target.config.port.unwrap_or(DEFAULT_TCP_PORT)
118118
);
119119

120120
send_target

0 commit comments

Comments
 (0)