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

fix: MSRV issues #180

Merged
merged 12 commits into from
Dec 4, 2024
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings
RUST_BACKTRACE: 1
MSRV: 1.70.0
MSRV: 1.73.0

jobs:
build:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:

services:
clickhouse:
image: clickhouse/clickhouse-server
image: clickhouse/clickhouse-server:24.10-alpine
ports:
- 8123:8123

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"
readme = "README.md"
edition = "2021"
# update `derive/Cargo.toml` and CI if changed
rust-version = "1.70.0"
rust-version = "1.73.0"

[lints.rust]
rust_2018_idioms = { level = "warn", priority = -1 }
Expand Down Expand Up @@ -85,7 +85,7 @@ hyper = "1.4"
hyper-util = { version = "0.1.6", features = ["client-legacy", "http1"] }
hyper-tls = { version = "0.6.0", optional = true }
rustls = { version = "0.23", default-features = false, optional = true }
hyper-rustls = { version = "0.27.2", default-features = false, features = [
hyper-rustls = { version = "0.27.3", default-features = false, features = [
"http1",
"tls12",
], optional = true }
Expand All @@ -102,7 +102,7 @@ lz4_flex = { version = "0.11.3", default-features = false, features = [
cityhash-rs = { version = "=1.0.1", optional = true } # exact version for safety
uuid = { version = "1", optional = true }
time = { version = "0.3", optional = true }
bstr = { version = "1.2", default-features = false }
bstr = { version = "1.11.0", default-features = false }
quanta = { version = "0.12", optional = true }
replace_with = { version = "0.1.7" }

Expand Down
2 changes: 1 addition & 1 deletion derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ homepage = "https://clickhouse.com"
edition = "2021"
license = "MIT OR Apache-2.0"
# update `Cargo.toml` and CI if changed
rust-version = "1.70.0"
rust-version = "1.73.0"

[lib]
proc-macro = true
Expand Down
6 changes: 3 additions & 3 deletions src/rowbinary/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct RowBinaryDeserializer<'cursor, 'data> {
input: &'cursor mut &'data [u8],
}

impl<'cursor, 'data> RowBinaryDeserializer<'cursor, 'data> {
impl<'data> RowBinaryDeserializer<'_, 'data> {
fn read_vec(&mut self, size: usize) -> Result<Vec<u8>> {
Ok(self.read_slice(size)?.to_vec())
}
Expand Down Expand Up @@ -64,7 +64,7 @@ macro_rules! impl_num {
};
}

impl<'cursor, 'data> Deserializer<'data> for &mut RowBinaryDeserializer<'cursor, 'data> {
impl<'data> Deserializer<'data> for &mut RowBinaryDeserializer<'_, 'data> {
type Error = Error;

impl_num!(i8, deserialize_i8, visit_i8, get_i8);
Expand Down Expand Up @@ -163,7 +163,7 @@ impl<'cursor, 'data> Deserializer<'data> for &mut RowBinaryDeserializer<'cursor,
len: usize,
}

impl<'de, 'cursor, 'data> SeqAccess<'data> for Access<'de, 'cursor, 'data> {
impl<'data> SeqAccess<'data> for Access<'_, '_, 'data> {
type Error = Error;

fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>>
Expand Down
8 changes: 4 additions & 4 deletions src/rowbinary/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ macro_rules! impl_num {
};
}

impl<'a, B: BufMut> Serializer for &'a mut RowBinarySerializer<B> {
impl<B: BufMut> Serializer for &'_ mut RowBinarySerializer<B> {
type Error = Error;
type Ok = ();
type SerializeMap = Impossible<(), Error>;
Expand Down Expand Up @@ -201,7 +201,7 @@ impl<'a, B: BufMut> Serializer for &'a mut RowBinarySerializer<B> {
}
}

impl<'a, B: BufMut> SerializeStruct for &'a mut RowBinarySerializer<B> {
impl<B: BufMut> SerializeStruct for &mut RowBinarySerializer<B> {
type Error = Error;
type Ok = ();

Expand All @@ -216,7 +216,7 @@ impl<'a, B: BufMut> SerializeStruct for &'a mut RowBinarySerializer<B> {
}
}

impl<'a, B: BufMut> SerializeSeq for &'a mut RowBinarySerializer<B> {
impl<B: BufMut> SerializeSeq for &'_ mut RowBinarySerializer<B> {
type Error = Error;
type Ok = ();

Expand All @@ -229,7 +229,7 @@ impl<'a, B: BufMut> SerializeSeq for &'a mut RowBinarySerializer<B> {
}
}

impl<'a, B: BufMut> SerializeTuple for &'a mut RowBinarySerializer<B> {
impl<B: BufMut> SerializeTuple for &'_ mut RowBinarySerializer<B> {
type Error = Error;
type Ok = ();

Expand Down
2 changes: 1 addition & 1 deletion src/sql/bind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl<S: Serialize> Bind for S {
pub struct Identifier<'a>(pub &'a str);

#[sealed]
impl<'a> Bind for Identifier<'a> {
impl Bind for Identifier<'_> {
#[inline]
fn write(&self, dst: &mut impl fmt::Write) -> Result<(), String> {
escape::identifier(self.0, dst).map_err(|err| err.to_string())
Expand Down
4 changes: 2 additions & 2 deletions src/sql/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ struct SqlListSerializer<'a, W> {
closing_char: char,
}

impl<'a, W: Write> SerializeSeq for SqlListSerializer<'a, W> {
impl<W: Write> SerializeSeq for SqlListSerializer<'_, W> {
type Error = SerializerError;
type Ok = ();

Expand All @@ -253,7 +253,7 @@ impl<'a, W: Write> SerializeSeq for SqlListSerializer<'a, W> {
}
}

impl<'a, W: Write> SerializeTuple for SqlListSerializer<'a, W> {
impl<W: Write> SerializeTuple for SqlListSerializer<'_, W> {
type Error = SerializerError;
type Ok = ();

Expand Down
Loading