Skip to content

Commit

Permalink
Merge pull request #900 from piodul/clippy-fixes-1.75
Browse files Browse the repository at this point in the history
scylla-cql, examples: fix clippy 1.75 issues
  • Loading branch information
Lorak-mmk authored Jan 2, 2024
2 parents 4a4fd0e + 0dbdfd9 commit 8263c53
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/compare-tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async fn main() -> Result<()> {
.await?
.rows
.unwrap()
.get(0)
.first()
.expect("token query no rows!")
.columns[0]
.as_ref()
Expand Down
2 changes: 1 addition & 1 deletion scylla-cql/src/frame/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ fn serialize_empty(buf: &mut Vec<u8>) -> Result<(), ValueTooBig> {
impl Value for CqlValue {
fn serialize(&self, buf: &mut Vec<u8>) -> Result<(), ValueTooBig> {
match self {
CqlValue::Map(m) => serialize_map(m.iter().map(|(k, v)| (k, v)), m.len(), buf),
CqlValue::Map(m) => serialize_map(m.iter().map(|p| (&p.0, &p.1)), m.len(), buf),
CqlValue::Tuple(t) => serialize_tuple(t.iter(), buf),

// A UDT value is composed of successive [bytes] values, one for each field of the UDT
Expand Down
2 changes: 1 addition & 1 deletion scylla-cql/src/types/serialize/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ fn serialize_cql_value<'b>(
CqlValue::Map(m) => serialize_mapping(
std::any::type_name::<CqlValue>(),
m.len(),
m.iter().map(|(ref k, ref v)| (k, v)),
m.iter().map(|p| (&p.0, &p.1)),
typ,
writer,
),
Expand Down

0 comments on commit 8263c53

Please sign in to comment.