Skip to content

Commit

Permalink
new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel5151 committed Jul 23, 2022
1 parent 86edf6d commit 463ab4c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/protocol/commands/_m.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ impl<'a> ParseCommand<'a> for m<'a> {
let addr_len = addr.len();
let len = decode_hex(body.next()?).ok()?;

drop(body);

// ensures that `split_at_mut` doesn't panic
if buf.len() < body_range.start + addr_len {
return None;
Expand Down
4 changes: 2 additions & 2 deletions src/protocol/commands/_qRegisterInfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ impl<'a> ParseCommand<'a> for qRegisterInfo {
fn from_packet(buf: PacketBuf<'a>) -> Option<Self> {
let body = buf.into_body();

let reg_id = decode_hex(body).ok()?;
let reg_id = decode_hex(body).ok()?;

Some(qRegisterInfo { reg_id })
}
}
2 changes: 0 additions & 2 deletions src/protocol/commands/_vFile_pread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ impl<'a> ParseCommand<'a> for vFilePread<'a> {
let count = decode_hex(body.next()?).ok()?;
let offset = decode_hex(body.next()?).ok()?;

drop(body);

Some(vFilePread {
fd,
count,
Expand Down
2 changes: 1 addition & 1 deletion src/util/dead_code_marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ pub fn black_box<T>(dummy: T) -> T {
macro_rules! __dead_code_marker {
($feature:literal, $ctx:literal) => {
#[cfg(feature = "__dead_code_marker")]
crate::util::dead_code_marker::black_box(concat!("<", $feature, ",", $ctx, ">"));
$crate::util::dead_code_marker::black_box(concat!("<", $feature, ",", $ctx, ">"));
};
}

0 comments on commit 463ab4c

Please sign in to comment.