chore: remove an outdated comment, fix Debug for SubscriptionFuture

Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
ljedrz 2020-08-05 11:46:36 +02:00
parent 61da270487
commit c3bcadf5d3
2 changed files with 3 additions and 3 deletions

View File

@ -207,7 +207,6 @@ impl NetworkBehaviour for SwarmApi {
self.connected_peers.remove(peer_id);
}
self.connections.remove(closed_addr);
// FIXME: should be an error
self.connect_registry.finish_subscription(
closed_addr.clone().into(),
Err("Connection reset by peer".to_owned()),

View File

@ -417,8 +417,9 @@ impl<T: Debug + PartialEq, E: Debug> fmt::Debug for SubscriptionFuture<T, E> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
write!(
fmt,
"SubscriptionFuture<Output = Result<{}, Cancelled>>",
std::any::type_name::<T>()
"SubscriptionFuture<Output = Result<{}, {}>>",
std::any::type_name::<T>(),
std::any::type_name::<E>(),
)
}
}