Update more crates to futures-0.3 (#1312)

This commit is contained in:
Toralf Wittner
2019-11-19 11:18:16 +01:00
committed by GitHub
parent be73b90345
commit 02c5f34fc0
15 changed files with 25 additions and 25 deletions

View File

@ -133,7 +133,7 @@ where
/// Destroys all outbound streams and returns the corresponding user data.
pub fn cancel_outgoing(&mut self) -> Vec<TUserData> {
let mut out = Vec::with_capacity(self.outbound_substreams.len());
for (user_data, outbound) in self.outbound_substreams.drain() {
for (user_data, outbound) in self.outbound_substreams.drain(..) {
out.push(user_data);
self.muxer.destroy_outbound(outbound);
}
@ -201,7 +201,7 @@ where
// The substreams that were produced will continue to work, as the muxer is held in an Arc.
// However we will no longer process any further inbound or outbound substream, and we
// therefore close everything.
for (_, outbound) in self.outbound_substreams.drain() {
for (_, outbound) in self.outbound_substreams.drain(..) {
self.muxer.destroy_outbound(outbound);
}
}