Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.13.1 #1040

Merged
merged 13 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge pull request #1002 from wprzytula/appease-clippy
codewide: appease Clippy
(cherry picked from commit e6d8625)
  • Loading branch information
wprzytula committed Jul 11, 2024
commit f9098c4f09e3e99de0fc768b90ebee1d006e2c38
9 changes: 5 additions & 4 deletions scylla-cql/src/frame/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use thiserror::Error;
use tokio::io::{AsyncRead, AsyncReadExt};
use uuid::Uuid;

use std::fmt::Display;
use std::{collections::HashMap, convert::TryFrom};

use request::SerializableRequest;
Expand Down Expand Up @@ -47,11 +48,11 @@ pub enum Compression {
Snappy,
}

impl ToString for Compression {
fn to_string(&self) -> String {
impl Display for Compression {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Compression::Lz4 => "lz4".to_owned(),
Compression::Snappy => "snappy".to_owned(),
Compression::Lz4 => f.write_str("lz4"),
Compression::Snappy => f.write_str("snappy"),
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions scylla-cql/src/frame/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,12 @@ pub trait ValueList {
}
}

impl Default for LegacySerializedValues {
fn default() -> Self {
Self::new()
}
}

impl LegacySerializedValues {
/// Creates empty value list
pub const fn new() -> Self {
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/connection_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ impl PoolRefiller {
new_sharder,
);

self.sharder = new_sharder.clone();
self.sharder.clone_from(&new_sharder);

// If the sharder has changed, we can throw away all previous connections.
// All connections to the same live node will have the same sharder,
Expand Down
10 changes: 6 additions & 4 deletions scylla/src/utils/parse.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::fmt::Display;

/// An error that can occur during parsing.
#[derive(Copy, Clone)]
pub(crate) struct ParseError {
Expand Down Expand Up @@ -27,11 +29,11 @@ pub(crate) enum ParseErrorCause {
Other(&'static str),
}

impl ToString for ParseErrorCause {
fn to_string(&self) -> String {
impl Display for ParseErrorCause {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ParseErrorCause::Expected(e) => format!("expected {:?}", e),
ParseErrorCause::Other(e) => e.to_string(),
ParseErrorCause::Expected(e) => write!(f, "expected {:?}", e),
ParseErrorCause::Other(e) => f.write_str(e),
}
}
}
Expand Down