summaryrefslogtreecommitdiffstats
path: root/buffered-reader/src/decompress_bzip2.rs
diff options
context:
space:
mode:
authorWiktor Kwapisiewicz <wiktor@metacode.biz>2023-05-30 12:03:15 +0200
committerWiktor Kwapisiewicz <wiktor@metacode.biz>2023-06-06 10:37:51 +0200
commitf5f9b14a304321816526c30ce98edbd6535df9c4 (patch)
treeccc0f752f9e1ea1037bd4f37a59a52387cd9e7fb /buffered-reader/src/decompress_bzip2.rs
parent4f3d260a013835a8ab0b2f15f45e22ca4678ab24 (diff)
buffered_reader: Introduce `into_boxed` and deprecate `as_boxed`.
- According to the Rust API Guidelines, a conversion function taking self should be called `into_*` if the self is not Copy, so this function should be named `into_boxed`. - Deprecate old function not to break the API. - Update all references in the code. - Fixes https://gitlab.com/sequoia-pgp/sequoia/-/issues/781
Diffstat (limited to 'buffered-reader/src/decompress_bzip2.rs')
-rw-r--r--buffered-reader/src/decompress_bzip2.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/buffered-reader/src/decompress_bzip2.rs b/buffered-reader/src/decompress_bzip2.rs
index d292390f..8f05cc43 100644
--- a/buffered-reader/src/decompress_bzip2.rs
+++ b/buffered-reader/src/decompress_bzip2.rs
@@ -108,7 +108,7 @@ impl<R: BufferedReader<C>, C: fmt::Debug + Send + Sync> BufferedReader<C> for Bz
fn into_inner<'b>(self: Box<Self>)
-> Option<Box<dyn BufferedReader<C> + 'b>> where Self: 'b {
// Strip the outer box.
- Some(self.reader.into_reader().into_inner().as_boxed())
+ Some(self.reader.into_reader().into_inner().into_boxed())
}
fn cookie_set(&mut self, cookie: C) -> C {