Remove a redundant fmt::Display bound
This commit is contained in:
parent
3892894ffa
commit
fd23c46726
|
@ -7,7 +7,7 @@
|
||||||
//! And it's unclear if these assumptions match the `zcashd` implementation.
|
//! And it's unclear if these assumptions match the `zcashd` implementation.
|
||||||
//! It should be refactored into a cleaner set of request/response pairs (#1515).
|
//! It should be refactored into a cleaner set of request/response pairs (#1515).
|
||||||
|
|
||||||
use std::{collections::HashSet, fmt, sync::Arc};
|
use std::{collections::HashSet, sync::Arc};
|
||||||
|
|
||||||
use futures::{
|
use futures::{
|
||||||
channel::{mpsc, oneshot},
|
channel::{mpsc, oneshot},
|
||||||
|
@ -495,8 +495,9 @@ where
|
||||||
/// Marks the peer as having failed with error `e`.
|
/// Marks the peer as having failed with error `e`.
|
||||||
fn fail_with<E>(&mut self, e: E)
|
fn fail_with<E>(&mut self, e: E)
|
||||||
where
|
where
|
||||||
E: Into<SharedPeerError> + fmt::Display,
|
E: Into<SharedPeerError>,
|
||||||
{
|
{
|
||||||
|
let e = e.into();
|
||||||
debug!(%e, "failing peer service with error");
|
debug!(%e, "failing peer service with error");
|
||||||
// Update the shared error slot
|
// Update the shared error slot
|
||||||
let mut guard = self
|
let mut guard = self
|
||||||
|
@ -507,7 +508,7 @@ where
|
||||||
if guard.is_some() {
|
if guard.is_some() {
|
||||||
panic!("called fail_with on already-failed connection state");
|
panic!("called fail_with on already-failed connection state");
|
||||||
} else {
|
} else {
|
||||||
*guard = Some(e.into());
|
*guard = Some(e);
|
||||||
}
|
}
|
||||||
// Drop the guard immediately to release the mutex.
|
// Drop the guard immediately to release the mutex.
|
||||||
std::mem::drop(guard);
|
std::mem::drop(guard);
|
||||||
|
|
Loading…
Reference in New Issue