From 47e87e0bc217a32bc2dbea5447ac8980c8a67e52 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 16 Oct 2018 11:47:40 +0300 Subject: [PATCH] impl fmt::Debug for Runtime --- src/runtime.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/runtime.rs b/src/runtime.rs index 2411c834..d4610bb5 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -37,6 +37,18 @@ where } } +impl std::fmt::Debug for Runtime +where + DB: Database, +{ + fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fmt.debug_struct("Runtime") + .field("id", &self.id()) + .field("revision", &self.current_revision()) + .finish() + } +} + impl Runtime where DB: Database,