Skip to content

Commit

Permalink
Remove lifetime from pinned self in trait
Browse files Browse the repository at this point in the history
I forgot why I did this originally

Signed-off-by: John Nunley <dev@notgull.net>
  • Loading branch information
notgull authored and fogti committed Sep 20, 2023
1 parent a27c126 commit 27a14c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
//! type Output = ();
//!
//! fn poll_with_strategy<'a, S: Strategy<'a>>(
//! mut self: Pin<&'a mut Self>,
//! mut self: Pin<&mut Self>,
//! strategy: &mut S,
//! context: &mut S::Context,
//! ) -> Poll<Self::Output> {
Expand Down Expand Up @@ -220,7 +220,7 @@ macro_rules! easy_wrapper {
}

pub(crate) fn poll_with_strategy<'__strategy, __S: $crate::Strategy<'__strategy>>(
self: ::core::pin::Pin<&'__strategy mut Self>,
self: ::core::pin::Pin<&mut Self>,
strategy: &mut __S,
context: &mut __S::Context,
) -> ::core::task::Poll<$output> {
Expand Down Expand Up @@ -284,7 +284,7 @@ pub trait EventListenerFuture {
/// This function should use the `Strategy::poll` method to poll the future, and proceed
/// based on the result.
fn poll_with_strategy<'a, S: Strategy<'a>>(
self: Pin<&'a mut Self>,
self: Pin<&mut Self>,
strategy: &mut S,
context: &mut S::Context,
) -> Poll<Self::Output>;
Expand Down
8 changes: 4 additions & 4 deletions tests/easy_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn easy_wrapper_generics() {
type Output = ();

fn poll_with_strategy<'a, S: Strategy<'a>>(
self: Pin<&'a mut Self>,
self: Pin<&mut Self>,
_strategy: &mut S,
_context: &mut S::Context,
) -> Poll<Self::Output> {
Expand All @@ -41,7 +41,7 @@ fn easy_wrapper_generics() {
type Output = T;

fn poll_with_strategy<'a, S: Strategy<'a>>(
self: Pin<&'a mut Self>,
self: Pin<&mut Self>,
_strategy: &mut S,
_context: &mut S::Context,
) -> Poll<Self::Output> {
Expand All @@ -64,7 +64,7 @@ fn easy_wrapper_generics() {
type Output = &'a ();

fn poll_with_strategy<'b, S: Strategy<'b>>(
self: Pin<&'b mut Self>,
self: Pin<&mut Self>,
_strategy: &mut S,
_context: &mut S::Context,
) -> Poll<Self::Output> {
Expand Down Expand Up @@ -93,7 +93,7 @@ fn easy_wrapper_generics() {
type Output = &'a T;

fn poll_with_strategy<'b, S: Strategy<'b>>(
self: Pin<&'b mut Self>,
self: Pin<&mut Self>,
_strategy: &mut S,
_context: &mut S::Context,
) -> Poll<Self::Output> {
Expand Down

0 comments on commit 27a14c4

Please sign in to comment.