Skip to content

Upgrade to 2021 edition #1244

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion postgres-derive-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "postgres-derive-test"
version = "0.1.0"
authors = ["Steven Fackler <[email protected]>"]
edition = "2018"
edition = "2021"

[dev-dependencies]
trybuild = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion postgres-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "postgres-derive"
version = "0.4.6"
authors = ["Steven Fackler <[email protected]>"]
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"

Expand Down
4 changes: 2 additions & 2 deletions postgres-derive/src/tosql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ pub fn expand_derive_tosql(input: DeriveInput) -> Result<TokenStream, Error> {
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<postgres_types::IsNull,
std::boxed::Box<std::error::Error +
std::boxed::Box<dyn std::error::Error +
std::marker::Sync +
std::marker::Send>> {
#to_sql_body
Expand Down
2 changes: 1 addition & 1 deletion postgres-native-tls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "postgres-native-tls"
version = "0.5.1"
authors = ["Steven Fackler <[email protected]>"]
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"
Expand Down
2 changes: 1 addition & 1 deletion postgres-openssl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "postgres-openssl"
version = "0.5.1"
authors = ["Steven Fackler <[email protected]>"]
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"
Expand Down
2 changes: 1 addition & 1 deletion postgres-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "postgres-protocol"
version = "0.6.8"
authors = ["Steven Fackler <[email protected]>"]
edition = "2018"
edition = "2021"
description = "Low level Postgres protocol APIs"
license = "MIT OR Apache-2.0"
repository = "https://github.com/sfackler/rust-postgres"
Expand Down
1 change: 0 additions & 1 deletion postgres-protocol/src/message/frontend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion postgres-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "postgres-types"
version = "0.2.9"
authors = ["Steven Fackler <[email protected]>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Conversions between Rust and Postgres values"
repository = "https://github.com/sfackler/rust-postgres"
Expand Down
1 change: 0 additions & 1 deletion postgres-types/src/time_02.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
1 change: 0 additions & 1 deletion postgres-types/src/time_03.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
2 changes: 1 addition & 1 deletion postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "postgres"
version = "0.19.10"
authors = ["Steven Fackler <[email protected]>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "A native, synchronous PostgreSQL client"
repository = "https://github.com/sfackler/rust-postgres"
Expand Down
2 changes: 1 addition & 1 deletion tokio-postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "tokio-postgres"
version = "0.7.13"
authors = ["Steven Fackler <[email protected]>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "A native, asynchronous PostgreSQL client"
repository = "https://github.com/sfackler/rust-postgres"
Expand Down
1 change: 0 additions & 1 deletion tokio-postgres/src/binary_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down