diff options
author | Azul <azul@riseup.net> | 2020-12-09 20:26:52 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2020-12-10 13:57:19 +0100 |
commit | 227db80b9d40526387f1e4a64f90464618fb885b (patch) | |
tree | bcf1ab1ed4d61fffea8d382872262650c5f49d86 /openpgp/src/armor.rs | |
parent | 80b59ecf7b33dcd2392eee8b4e2def4101410749 (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/armor.rs')
-rw-r--r-- | openpgp/src/armor.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openpgp/src/armor.rs b/openpgp/src/armor.rs index 686ea939..88b31a6c 100644 --- a/openpgp/src/armor.rs +++ b/openpgp/src/armor.rs @@ -486,6 +486,7 @@ struct IoReader<'a> { prefix_len: usize, prefix_remaining: usize, } +assert_send_and_sync!(IoReader<'_>); impl Default for ReaderMode { fn default() -> Self { @@ -563,7 +564,7 @@ impl<'a> Reader<'a> { /// # } /// ``` pub fn new<R, M>(inner: R, mode: M) -> Self - where R: 'a + Read, + where R: 'a + Read + Send + Sync, M: Into<Option<ReaderMode>> { Self::from_buffered_reader( @@ -574,7 +575,7 @@ impl<'a> Reader<'a> { /// Creates a `Reader` from an `io::Read`er. pub fn from_reader<R, M>(reader: R, mode: M) -> Self - where R: 'a + Read, + where R: 'a + Read + Send + Sync, M: Into<Option<ReaderMode>> { Self::from_buffered_reader( |