Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
krojew committed Nov 15, 2023
1 parent cb7ef49 commit 631bc72
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
8 changes: 2 additions & 6 deletions cassandra-protocol/src/frame/frame_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ impl FrameEncoder for UncompressedFrameEncoder {

impl Default for UncompressedFrameEncoder {
fn default() -> Self {
let mut buffer = vec![];
buffer.resize(UNCOMPRESSED_FRAME_HEADER_LENGTH, 0);

let buffer = vec![0; UNCOMPRESSED_FRAME_HEADER_LENGTH];
Self { buffer }
}
}
Expand Down Expand Up @@ -265,9 +263,7 @@ impl FrameEncoder for Lz4FrameEncoder {

impl Default for Lz4FrameEncoder {
fn default() -> Self {
let mut buffer = vec![];
buffer.resize(COMPRESSED_FRAME_HEADER_LENGTH, 0);

let buffer = vec![0; COMPRESSED_FRAME_HEADER_LENGTH];
Self { buffer }
}
}
Expand Down
8 changes: 1 addition & 7 deletions cassandra-protocol/src/query/prepared_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,7 @@ impl Eq for PreparedQuery {}
impl PartialOrd for PreparedQuery {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
match self.id.partial_cmp(&other.id) {
Some(Ordering::Equal) | None => self
.result_metadata_id
.load()
.partial_cmp(&other.result_metadata_id.load()),
result => result,
}
Some(self.cmp(other))
}
}

Expand Down
3 changes: 2 additions & 1 deletion cdrs-tokio-helpers-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ edition = "2018"
proc-macro = true

[dependencies]
itertools = "0.11.0"
itertools = "0.12.0"
proc-macro2 = "1.0.67"
syn = "2.0.37"
quote = "1.0.33"

0 comments on commit 631bc72

Please sign in to comment.