Skip to content

Commit

Permalink
AsRef/AsMut for Extending
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheyca committed Feb 15, 2024
1 parent 3b1d98a commit 87605de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 12 additions & 0 deletions src/pinned_extend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ impl<S, R> Extending<S, R> {
}
}

impl<S, R> AsRef<S> for Extending<S, R> {
fn as_ref(&self) -> &S {
&self.inner
}
}

impl<S, R> AsMut<S> for Extending<S, R> {
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>,
Expand Down

0 comments on commit 87605de

Please sign in to comment.