Skip to content

Commit

Permalink
chore(clippy): Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
IshanGrover2004 committed Aug 25, 2024
1 parent 00431fd commit e3768cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/rust/lib_ccxr/src/net/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,8 @@ pub trait BlockStream {
return Ok(false);
}

if data.len() > 0 {
if self.send(data)? != data.len() {
return Ok(false);
}
if data.len() > 0 && self.send(data)? != data.len() {
return Ok(false);
}

if self.send(END_MARKER.as_bytes())? != END_MARKER.len() {
Expand Down
2 changes: 1 addition & 1 deletion src/rust/lib_ccxr/src/net/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl<'a> SendTarget<'a> {
info!(
"Connected to {}:{}\n",
send_target.config.target_addr,
send_target.config.port.unwrap_or_else(|| DEFAULT_TCP_PORT)
send_target.config.port.unwrap_or(DEFAULT_TCP_PORT)
);

send_target
Expand Down

0 comments on commit e3768cf

Please sign in to comment.