Display impl for ReqId
This commit is contained in:
parent
55dbfbf35b
commit
9b4f90718f
@ -30,6 +30,7 @@ use util::{Bytes, Mutex, RwLock, U256};
|
|||||||
use time::{Duration, SteadyTime};
|
use time::{Duration, SteadyTime};
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::fmt;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
|
||||||
@ -122,6 +123,12 @@ mod timeout {
|
|||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub struct ReqId(usize);
|
pub struct ReqId(usize);
|
||||||
|
|
||||||
|
impl fmt::Display for ReqId {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
write!(f, "Request #{}", self.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// A pending peer: one we've sent our status to but
|
// A pending peer: one we've sent our status to but
|
||||||
// may not have received one for.
|
// may not have received one for.
|
||||||
struct PendingPeer {
|
struct PendingPeer {
|
||||||
|
Loading…
Reference in New Issue
Block a user