summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2022-12-15 17:53:36 +0100
committerJustus Winter <justus@sequoia-pgp.org>2022-12-23 10:52:57 +0100
commitf4d4c9804a29d69ad7b88147c07f5d2639fb7d88 (patch)
tree4163119d7e22171b73f13e6f3edc3ce90be9cec5
parent75bb553e573da523c78ef33a4b92bd57f34c73b2 (diff)
Port to Rust Edition 2021.
-rw-r--r--autocrypt/Cargo.toml2
-rw-r--r--buffered-reader/Cargo.toml2
-rw-r--r--buffered-reader/src/lib.rs2
-rw-r--r--buffered-reader/src/macros.rs1
-rw-r--r--ipc/Cargo.toml2
-rw-r--r--ipc/src/macros.rs1
-rw-r--r--net/Cargo.toml2
-rw-r--r--openpgp/Cargo.toml2
-rw-r--r--openpgp/src/cert/builder.rs1
-rw-r--r--openpgp/src/cert/parser/mod.rs1
-rw-r--r--openpgp/src/macros.rs1
-rw-r--r--sq/Cargo.toml2
12 files changed, 7 insertions, 12 deletions
diff --git a/autocrypt/Cargo.toml b/autocrypt/Cargo.toml
index 8ca78aa5..b0e2fc0a 100644
--- a/autocrypt/Cargo.toml
+++ b/autocrypt/Cargo.toml
@@ -14,7 +14,7 @@ readme = "README.md"
keywords = ["autocrypt", "mua", "opportunistic", "mail", "encryption"]
categories = ["cryptography", "authentication", "email"]
license = "LGPL-2.0-or-later"
-edition = "2018"
+edition = "2021"
rust-version = "1.60"
[badges]
diff --git a/buffered-reader/Cargo.toml b/buffered-reader/Cargo.toml
index 4d3b2719..2456f658 100644
--- a/buffered-reader/Cargo.toml
+++ b/buffered-reader/Cargo.toml
@@ -12,7 +12,7 @@ homepage = "https://sequoia-pgp.org/"
repository = "https://gitlab.com/sequoia-pgp/sequoia"
readme = "README.md"
license = "LGPL-2.0-or-later"
-edition = "2018"
+edition = "2021"
rust-version = "1.60"
[badges]
diff --git a/buffered-reader/src/lib.rs b/buffered-reader/src/lib.rs
index 28f63a62..db9a5b46 100644
--- a/buffered-reader/src/lib.rs
+++ b/buffered-reader/src/lib.rs
@@ -184,7 +184,7 @@
//!
//! # f(); fn f() -> Result<(), std::io::Error> {
//! # const FILENAME : &str = "/dev/null";
-//! let mut br : Box<BufferedReader<()>>
+//! let mut br : Box<dyn BufferedReader<()>>
//! = Box::new(buffered_reader::File::open(FILENAME)?);
//!
//! // While we haven't reached EOF (i.e., we can read at
diff --git a/buffered-reader/src/macros.rs b/buffered-reader/src/macros.rs
index eafb6add..5d9d5478 100644
--- a/buffered-reader/src/macros.rs
+++ b/buffered-reader/src/macros.rs
@@ -11,7 +11,6 @@ macro_rules! trace {
// Converts an indentation level to whitespace.
pub(crate) fn indent(i: isize) -> &'static str {
- use std::convert::TryFrom;
let s = " ";
&s[0..usize::try_from(i).unwrap_or(0).min(s.len())]
}
diff --git a/ipc/Cargo.toml b/ipc/Cargo.toml
index 00e6e7a0..038b1a7e 100644
--- a/ipc/Cargo.toml
+++ b/ipc/Cargo.toml
@@ -13,7 +13,7 @@ homepage = "https://sequoia-pgp.org/"
repository = "https://gitlab.com/sequoia-pgp/sequoia"
readme = "README.md"
license = "LGPL-2.0-or-later"
-edition = "2018"
+edition = "2021"
rust-version = "1.60"
[badges]
diff --git a/ipc/src/macros.rs b/ipc/src/macros.rs
index d31ab3b0..eb24071c 100644
--- a/ipc/src/macros.rs
+++ b/ipc/src/macros.rs
@@ -11,7 +11,6 @@ macro_rules! trace {
// Converts an indentation level to whitespace.
pub(crate) fn indent(i: isize) -> &'static str {
- use std::convert::TryFrom;
let s = " ";
&s[0..usize::try_from(i).unwrap_or(0).min(s.len())]
}
diff --git a/net/Cargo.toml b/net/Cargo.toml
index 0d1478f0..845dad79 100644
--- a/net/Cargo.toml
+++ b/net/Cargo.toml
@@ -14,7 +14,7 @@ readme = "README.md"
keywords = ["cryptography", "openpgp", "pgp", "hkp", "keyserver"]
categories = ["cryptography", "authentication", "email"]
license = "LGPL-2.0-or-later"
-edition = "2018"
+edition = "2021"
rust-version = "1.60"
[badges]
diff --git a/openpgp/Cargo.toml b/openpgp/Cargo.toml
index a6f6b308..74f9319b 100644
--- a/openpgp/Cargo.toml
+++ b/openpgp/Cargo.toml
@@ -19,7 +19,7 @@ readme = "README.md"
keywords = ["cryptography", "openpgp", "pgp", "encryption", "signing"]
categories = ["cryptography", "authentication", "email"]
license = "LGPL-2.0-or-later"
-edition = "2018"
+edition = "2021"
rust-version = "1.60"
[badges]
diff --git a/openpgp/src/cert/builder.rs b/openpgp/src/cert/builder.rs
index 3593fdc2..3060627c 100644
--- a/openpgp/src/cert/builder.rs
+++ b/openpgp/src/cert/builder.rs
@@ -1341,7 +1341,6 @@ impl CertBuilder<'_> {
pub fn generate(self) -> Result<(Cert, Signature)> {
use crate::Packet;
use crate::types::ReasonForRevocation;
- use std::convert::TryFrom;
let creation_time =
self.creation_time.unwrap_or_else(|| {
diff --git a/openpgp/src/cert/parser/mod.rs b/openpgp/src/cert/parser/mod.rs
index b98f286b..ac96c1a4 100644
--- a/openpgp/src/cert/parser/mod.rs
+++ b/openpgp/src/cert/parser/mod.rs
@@ -802,7 +802,6 @@ impl<'a> CertParser<'a> {
t!("Finalizing certificate with {} packets", n_packets);
// Convert to tokens, but preserve packets if it fails.
- use std::convert::TryInto;
let mut failed = false;
let mut packets: Vec<Packet> = Vec::with_capacity(0);
let mut tokens: Vec<Token> = Vec::with_capacity(n_packets);
diff --git a/openpgp/src/macros.rs b/openpgp/src/macros.rs
index 8a84f3bb..aa316480 100644
--- a/openpgp/src/macros.rs
+++ b/openpgp/src/macros.rs
@@ -13,7 +13,6 @@ macro_rules! trace {
// Converts an indentation level to whitespace.
pub(crate) fn indent(i: isize) -> &'static str {
- use std::convert::TryFrom;
let s = " ";
&s[0..cmp::min(usize::try_from(i).unwrap_or(0), s.len())]
}
diff --git a/sq/Cargo.toml b/sq/Cargo.toml
index c4c45860..855a7dde 100644
--- a/sq/Cargo.toml
+++ b/sq/Cargo.toml
@@ -21,7 +21,7 @@ readme = "../README.md"
keywords = ["cryptography", "openpgp", "pgp", "encryption", "signing"]
categories = ["cryptography", "authentication", "command-line-utilities"]
license = "GPL-2.0-or-later"
-edition = "2018"
+edition = "2021"
rust-version = "1.60"
[badges]