summaryrefslogtreecommitdiffstats
path: root/openpgp/src/cert.rs
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2020-12-09 20:26:52 +0100
committerAzul <azul@riseup.net>2020-12-10 13:57:19 +0100
commit227db80b9d40526387f1e4a64f90464618fb885b (patch)
treebcf1ab1ed4d61fffea8d382872262650c5f49d86 /openpgp/src/cert.rs
parent80b59ecf7b33dcd2392eee8b4e2def4101410749 (diff)
buffered-reader: Require Cookies to be Send and Sync.
- This way the entire `BufferedReader<C>` will be `Send` and `Sync`. - Modify all other crates accordingly. - See #615.
Diffstat (limited to 'openpgp/src/cert.rs')
-rw-r--r--openpgp/src/cert.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/cert.rs b/openpgp/src/cert.rs
index 7acf8e4e..bb2970fc 100644
--- a/openpgp/src/cert.rs
+++ b/openpgp/src/cert.rs
@@ -740,7 +740,7 @@ impl std::str::FromStr for Cert {
impl<'a> Parse<'a, Cert> for Cert {
/// Returns the first Cert encountered in the reader.
- fn from_reader<R: io::Read>(reader: R) -> Result<Self> {
+ fn from_reader<R: io::Read + Send + Sync>(reader: R) -> Result<Self> {
Cert::try_from(PacketParser::from_reader(reader)?)
}
@@ -752,7 +752,7 @@ impl<'a> Parse<'a, Cert> for Cert {
/// Returns the first Cert found in `buf`.
///
/// `buf` must be an OpenPGP-encoded message.
- fn from_bytes<D: AsRef<[u8]> + ?Sized>(data: &'a D) -> Result<Self> {
+ fn from_bytes<D: AsRef<[u8]> + ?Sized + Send + Sync>(data: &'a D) -> Result<Self> {
Cert::try_from(PacketParser::from_bytes(data)?)
}
}