summaryrefslogtreecommitdiffstats
path: root/buffered-reader/src/limitor.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/limitor.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/limitor.rs')
-rw-r--r--buffered-reader/src/limitor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/buffered-reader/src/limitor.rs b/buffered-reader/src/limitor.rs
index ebf8d6b7..51e5c0d3 100644
--- a/buffered-reader/src/limitor.rs
+++ b/buffered-reader/src/limitor.rs
@@ -131,7 +131,7 @@ impl<T: BufferedReader<C>, C: fmt::Debug + Sync + Send> BufferedReader<C> for Li
fn into_inner<'b>(self: Box<Self>) -> Option<Box<dyn BufferedReader<C> + 'b>>
where Self: 'b {
- Some(self.reader.as_boxed())
+ Some(self.reader.into_boxed())
}
fn cookie_set(&mut self, cookie: C) -> C {