From 9b4f90718f7ee49cd5bd8932f763c6efbe432d92 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Tue, 27 Dec 2016 13:54:51 +0100 Subject: [PATCH] Display impl for ReqId --- ethcore/light/src/net/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index e27ba8612..f1585643f 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -30,6 +30,7 @@ use util::{Bytes, Mutex, RwLock, U256}; use time::{Duration, SteadyTime}; use std::collections::HashMap; +use std::fmt; use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering}; @@ -122,6 +123,12 @@ mod timeout { #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 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 // may not have received one for. struct PendingPeer {