Explicitly add dyn keyword to trait objects

Trait objects without are deprecated with the latest nightly and this
makes it more clear that we're doing dynamic dispatch anyway.
This commit is contained in:
Sebastian Dröge 2019-06-06 09:26:02 +03:00
parent d12950a434
commit 50037325ff
6 changed files with 11 additions and 9 deletions

View file

@ -292,7 +292,7 @@ impl AppSrc {
element: &gst::Element,
item: Either<gst::Buffer, gst::Event>,
) -> future::Either<
Box<Future<Item = (), Error = ()> + Send + 'static>,
Box<dyn Future<Item = (), Error = ()> + Send + 'static>,
future::FutureResult<(), ()>,
> {
let mut events = Vec::new();

View file

@ -183,7 +183,7 @@ struct IOContextInner {
_shutdown: IOContextShutdown,
pending_futures: Mutex<(
u64,
HashMap<u64, FuturesUnordered<Box<Future<Item = (), Error = ()> + Send + 'static>>>,
HashMap<u64, FuturesUnordered<Box<dyn Future<Item = (), Error = ()> + Send + 'static>>>,
)>,
}
@ -291,8 +291,10 @@ impl IOContext {
}
}
pub type PendingFuturesFuture<E> =
future::Either<Box<Future<Item = (), Error = E> + Send + 'static>, future::FutureResult<(), E>>;
pub type PendingFuturesFuture<E> = future::Either<
Box<dyn Future<Item = (), Error = E> + Send + 'static>,
future::FutureResult<(), E>,
>;
#[derive(Clone, Copy, Eq, PartialEq, Hash, Debug)]
pub struct PendingFutureId(u64);

View file

@ -881,7 +881,7 @@ impl ProxySrc {
element: &gst::Element,
item: DataQueueItem,
) -> future::Either<
Box<Future<Item = (), Error = gst::FlowError> + Send + 'static>,
Box<dyn Future<Item = (), Error = gst::FlowError> + Send + 'static>,
future::FutureResult<(), gst::FlowError>,
> {
let event = {

View file

@ -506,7 +506,7 @@ impl Queue {
element: &gst::Element,
item: DataQueueItem,
) -> future::Either<
Box<Future<Item = (), Error = gst::FlowError> + Send + 'static>,
Box<dyn Future<Item = (), Error = gst::FlowError> + Send + 'static>,
future::FutureResult<(), gst::FlowError>,
> {
let event = {

View file

@ -310,7 +310,7 @@ impl TcpClientSrc {
element: &gst::Element,
buffer: gst::Buffer,
) -> future::Either<
Box<Future<Item = (), Error = gst::FlowError> + Send + 'static>,
Box<dyn Future<Item = (), Error = gst::FlowError> + Send + 'static>,
future::FutureResult<(), gst::FlowError>,
> {
let mut events = Vec::new();

View file

@ -444,7 +444,7 @@ impl UdpSrc {
element: &gst::Element,
buffer: gst::Buffer,
) -> future::Either<
Box<Future<Item = (), Error = gst::FlowError> + Send + 'static>,
Box<dyn Future<Item = (), Error = gst::FlowError> + Send + 'static>,
future::FutureResult<(), gst::FlowError>,
> {
let mut events = Vec::new();
@ -556,7 +556,7 @@ impl UdpSrc {
let socket = if let Some(ref wrapped_socket) = settings.socket {
use std::net::UdpSocket;
let mut socket: UdpSocket;
let socket: UdpSocket;
#[cfg(unix)]
{