diff --git a/gstreamer/src/promise.rs b/gstreamer/src/promise.rs
index b0c880ad7..4eaf2a093 100644
--- a/gstreamer/src/promise.rs
+++ b/gstreamer/src/promise.rs
@@ -5,10 +5,9 @@ use crate::Structure;
use crate::StructureRef;
use glib::translate::*;
-use std::marker::PhantomData;
-use std::pin::Pin;
use std::ptr;
use std::task::{Context, Poll};
+use std::{ops::Deref, pin::Pin};
glib::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -82,7 +81,7 @@ impl Promise {
}
}
- pub fn new_future<'a>() -> (Self, PromiseFuture<'a>) {
+ pub fn new_future() -> (Self, PromiseFuture) {
use futures_channel::oneshot;
// We only use the channel as a convenient waker
@@ -91,10 +90,7 @@ impl Promise {
let _ = sender.send(());
});
- (
- promise.clone(),
- PromiseFuture(promise, receiver, PhantomData),
- )
+ (promise.clone(), PromiseFuture(promise, receiver))
}
pub fn expire(&self) {
@@ -144,28 +140,26 @@ unsafe impl Send for Promise {}
unsafe impl Sync for Promise {}
#[derive(Debug)]
-pub struct PromiseFuture<'a>(
- Promise,
- futures_channel::oneshot::Receiver<()>,
- PhantomData<&'a StructureRef>,
-);
+pub struct PromiseFuture(Promise, futures_channel::oneshot::Receiver<()>);
-impl<'a> std::future::Future for PromiseFuture<'a> {
- type Output = Result