diff --git a/postgres-derive-test/Cargo.toml b/postgres-derive-test/Cargo.toml index 24fd1614f..ce597fe52 100644 --- a/postgres-derive-test/Cargo.toml +++ b/postgres-derive-test/Cargo.toml @@ -2,7 +2,7 @@ name = "postgres-derive-test" version = "0.1.0" authors = ["Steven Fackler "] -edition = "2018" +edition = "2021" [dev-dependencies] trybuild = "1.0" diff --git a/postgres-derive/Cargo.toml b/postgres-derive/Cargo.toml index 96600f124..74a9063e0 100644 --- a/postgres-derive/Cargo.toml +++ b/postgres-derive/Cargo.toml @@ -3,7 +3,7 @@ name = "postgres-derive" version = "0.4.6" authors = ["Steven Fackler "] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" description = "An internal crate used by postgres-types" repository = "https://github.com/sfackler/rust-postgres" diff --git a/postgres-derive/src/tosql.rs b/postgres-derive/src/tosql.rs index 81d4834bf..4661a4a0b 100644 --- a/postgres-derive/src/tosql.rs +++ b/postgres-derive/src/tosql.rs @@ -112,12 +112,12 @@ pub fn expand_derive_tosql(input: DeriveInput) -> Result { let generics = append_generic_bound(input.generics.to_owned(), &new_tosql_bound()); let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); let out = quote! { - impl#impl_generics postgres_types::ToSql for #ident#ty_generics #where_clause { + impl #impl_generics postgres_types::ToSql for #ident #ty_generics #where_clause { fn to_sql(&self, _type: &postgres_types::Type, buf: &mut postgres_types::private::BytesMut) -> std::result::Result> { #to_sql_body diff --git a/postgres-native-tls/Cargo.toml b/postgres-native-tls/Cargo.toml index f79ae5491..af13ebbb0 100644 --- a/postgres-native-tls/Cargo.toml +++ b/postgres-native-tls/Cargo.toml @@ -2,7 +2,7 @@ name = "postgres-native-tls" version = "0.5.1" authors = ["Steven Fackler "] -edition = "2018" +edition = "2021" license = "MIT OR Apache-2.0" description = "TLS support for tokio-postgres via native-tls" repository = "https://github.com/sfackler/rust-postgres" diff --git a/postgres-openssl/Cargo.toml b/postgres-openssl/Cargo.toml index 6ebb86bef..4e65d688a 100644 --- a/postgres-openssl/Cargo.toml +++ b/postgres-openssl/Cargo.toml @@ -2,7 +2,7 @@ name = "postgres-openssl" version = "0.5.1" authors = ["Steven Fackler "] -edition = "2018" +edition = "2021" license = "MIT OR Apache-2.0" description = "TLS support for tokio-postgres via openssl" repository = "https://github.com/sfackler/rust-postgres" diff --git a/postgres-protocol/Cargo.toml b/postgres-protocol/Cargo.toml index 9351ea14f..e13810dee 100644 --- a/postgres-protocol/Cargo.toml +++ b/postgres-protocol/Cargo.toml @@ -2,7 +2,7 @@ name = "postgres-protocol" version = "0.6.8" authors = ["Steven Fackler "] -edition = "2018" +edition = "2021" description = "Low level Postgres protocol APIs" license = "MIT OR Apache-2.0" repository = "https://github.com/sfackler/rust-postgres" diff --git a/postgres-protocol/src/message/frontend.rs b/postgres-protocol/src/message/frontend.rs index 600f7da48..22c420664 100644 --- a/postgres-protocol/src/message/frontend.rs +++ b/postgres-protocol/src/message/frontend.rs @@ -3,7 +3,6 @@ use byteorder::{BigEndian, ByteOrder}; use bytes::{Buf, BufMut, BytesMut}; -use std::convert::TryFrom; use std::error::Error; use std::io; use std::marker; diff --git a/postgres-types/Cargo.toml b/postgres-types/Cargo.toml index d6527f3b9..d82384d78 100644 --- a/postgres-types/Cargo.toml +++ b/postgres-types/Cargo.toml @@ -2,7 +2,7 @@ name = "postgres-types" version = "0.2.9" authors = ["Steven Fackler "] -edition = "2018" +edition = "2021" license = "MIT OR Apache-2.0" description = "Conversions between Rust and Postgres values" repository = "https://github.com/sfackler/rust-postgres" diff --git a/postgres-types/src/time_02.rs b/postgres-types/src/time_02.rs index 19a8909e7..bc8d5c29a 100644 --- a/postgres-types/src/time_02.rs +++ b/postgres-types/src/time_02.rs @@ -1,6 +1,5 @@ use bytes::BytesMut; use postgres_protocol::types; -use std::convert::TryFrom; use std::error::Error; use time_02::{date, time, Date, Duration, OffsetDateTime, PrimitiveDateTime, Time, UtcOffset}; diff --git a/postgres-types/src/time_03.rs b/postgres-types/src/time_03.rs index 4deea663f..296d74a28 100644 --- a/postgres-types/src/time_03.rs +++ b/postgres-types/src/time_03.rs @@ -1,6 +1,5 @@ use bytes::BytesMut; use postgres_protocol::types; -use std::convert::TryFrom; use std::error::Error; use time_03::{Date, Duration, OffsetDateTime, PrimitiveDateTime, Time, UtcOffset}; diff --git a/postgres/Cargo.toml b/postgres/Cargo.toml index 456bfb808..2e39f38c1 100644 --- a/postgres/Cargo.toml +++ b/postgres/Cargo.toml @@ -2,7 +2,7 @@ name = "postgres" version = "0.19.10" authors = ["Steven Fackler "] -edition = "2018" +edition = "2021" license = "MIT OR Apache-2.0" description = "A native, synchronous PostgreSQL client" repository = "https://github.com/sfackler/rust-postgres" diff --git a/tokio-postgres/Cargo.toml b/tokio-postgres/Cargo.toml index f969ae5b7..1ef9cf49f 100644 --- a/tokio-postgres/Cargo.toml +++ b/tokio-postgres/Cargo.toml @@ -2,7 +2,7 @@ name = "tokio-postgres" version = "0.7.13" authors = ["Steven Fackler "] -edition = "2018" +edition = "2021" license = "MIT OR Apache-2.0" description = "A native, asynchronous PostgreSQL client" repository = "https://github.com/sfackler/rust-postgres" diff --git a/tokio-postgres/src/binary_copy.rs b/tokio-postgres/src/binary_copy.rs index dab141663..54f228ddf 100644 --- a/tokio-postgres/src/binary_copy.rs +++ b/tokio-postgres/src/binary_copy.rs @@ -7,7 +7,6 @@ use bytes::{Buf, BufMut, Bytes, BytesMut}; use futures_util::{ready, SinkExt, Stream}; use pin_project_lite::pin_project; use postgres_types::BorrowToSql; -use std::convert::TryFrom; use std::io; use std::io::Cursor; use std::ops::Range;