Skip to content

Commit 0dcdd22

Browse files
committed
feat!: removed legacy ExtendedFuture type
1 parent 27f76ce commit 0dcdd22

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

src/extended/future.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ use crate::extended::Reference;
1010
use crate::pointer_like::PointerPinUnforgotten;
1111
use crate::pointer_like::erased_static::{fn_drop, fn_poll_unforgotten};
1212

13-
use super::AssociateReference;
14-
1513
impl<'scope, 'env> Extender<'scope, 'env> {
1614
// TODO: pointer width extended value like extend_future_box
1715
pub fn future<'extended, P, O>(
@@ -90,28 +88,3 @@ impl<P, O, D: Fn(*mut ())> Drop for ErasedFuture<P, O, D> {
9088
(self.drop)(self.ptr.as_ptr())
9189
}
9290
}
93-
94-
pub mod legacy {
95-
use core::future::Future;
96-
use core::pin::Pin;
97-
use core::ptr;
98-
use core::task;
99-
100-
use crate::extended::Reference;
101-
102-
pub struct ExtendedFuture<O> {
103-
// TODO: Could make a single dynamically sized struct
104-
pub(crate) func: ptr::NonNull<dyn Future<Output = O> + Send>,
105-
pub(crate) _reference_guard: Reference<'static>,
106-
}
107-
108-
impl<O> Future for ExtendedFuture<O> {
109-
type Output = O;
110-
111-
fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> task::Poll<Self::Output> {
112-
unsafe { Pin::new_unchecked(self.get_unchecked_mut().func.as_mut()) }.poll(cx)
113-
}
114-
}
115-
116-
unsafe impl<O> Send for ExtendedFuture<O> where O: Send {}
117-
}

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ mod ref_once;
3939
pub use extended::Extender;
4040
pub use extended::func::{extend_fn_mut_unchecked, extend_fn_once_unchecked, extend_fn_unchecked};
4141
pub use extended::future::extend_future_unchecked;
42-
pub use extended::future::legacy::ExtendedFuture;
4342
pub use ref_once::RefOnce;
4443

4544
pub fn lock_scope<'env, F, T>(scope: F) -> T

0 commit comments

Comments
 (0)