Add missing dyn on Future trait object, and deny that.
This commit is contained in:
parent
2a952ffa58
commit
c69140b05e
1 changed files with 4 additions and 2 deletions
|
|
@ -4,6 +4,8 @@
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// 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/.
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
#![deny(bare_trait_objects)]
|
||||||
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use futures::{Future,Stream, Sink, sync::mpsc};
|
use futures::{Future,Stream, Sink, sync::mpsc};
|
||||||
use tokio_xmpp::{
|
use tokio_xmpp::{
|
||||||
|
|
@ -298,7 +300,7 @@ impl ClientBuilder<'_> {
|
||||||
|
|
||||||
pub struct Client {
|
pub struct Client {
|
||||||
sender_tx: mpsc::UnboundedSender<Packet>,
|
sender_tx: mpsc::UnboundedSender<Packet>,
|
||||||
stream: Box<Stream<Item = Event, Error = Error>>,
|
stream: Box<dyn Stream<Item = Event, Error = Error>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Client {
|
impl Client {
|
||||||
|
|
@ -308,7 +310,7 @@ impl Client {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn listen(self) -> Box<Stream<Item = Event, Error = Error>> {
|
pub fn listen(self) -> Box<dyn Stream<Item = Event, Error = Error>> {
|
||||||
self.stream
|
self.stream
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue