From c69140b05eb7036ad099fbe6d316d256d3334883 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 25 Jul 2019 15:03:22 +0200 Subject: [PATCH] Add missing dyn on Future trait object, and deny that. --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0f0afe8..8517831 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,8 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. +#![deny(bare_trait_objects)] + use std::str::FromStr; use futures::{Future,Stream, Sink, sync::mpsc}; use tokio_xmpp::{ @@ -298,7 +300,7 @@ impl ClientBuilder<'_> { pub struct Client { sender_tx: mpsc::UnboundedSender, - stream: Box>, + stream: Box>, } impl Client { @@ -308,7 +310,7 @@ impl Client { } } - pub fn listen(self) -> Box> { + pub fn listen(self) -> Box> { self.stream } }