From 87605de14d169090eb4578c3eba5fd70568e817c Mon Sep 17 00:00:00 2001 From: timofey Date: Thu, 15 Feb 2024 00:05:06 +0000 Subject: [PATCH] AsRef/AsMut for Extending --- Cargo.toml | 2 +- src/pinned_extend.rs | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index eadd01f..ce9af00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ members = ["internal/ruchei-sample"] [workspace.package] -version = "0.0.66" # ad7038ef3b571dc133c108e14e6bb0f8cdcd812d and earlier have invalid versions +version = "0.0.67" # ad7038ef3b571dc133c108e14e6bb0f8cdcd812d and earlier have invalid versions edition = "2021" publish = true license = "MIT OR Apache-2.0" diff --git a/src/pinned_extend.rs b/src/pinned_extend.rs index 63e9966..d5c1361 100644 --- a/src/pinned_extend.rs +++ b/src/pinned_extend.rs @@ -33,6 +33,18 @@ impl Extending { } } +impl AsRef for Extending { + fn as_ref(&self) -> &S { + &self.inner + } +} + +impl AsMut for Extending { + fn as_mut(&mut self) -> &mut S { + &mut self.inner + } +} + struct PollIter<'a, 'cx, R> { cx: &'a mut Context<'cx>, incoming: Pin<&'a mut R>,