From a3f72731537961144c3686506d831002dee6ee9f Mon Sep 17 00:00:00 2001 From: Ben Stern Date: Thu, 10 May 2018 01:21:08 -0400 Subject: [PATCH] Implement `Display` for `ConnectionSignature` --- Cargo.toml | 2 +- src/connectionsignature.rs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 4ab03dc..6fc72be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "websession" -version = "0.8.0" +version = "0.8.1" authors = ["Jeff Olhoeft ", "Ben Stern "] description = "Web Session Support for Rust" license = "MIT/Apache-2.0" diff --git a/src/connectionsignature.rs b/src/connectionsignature.rs index 051654e..175f708 100644 --- a/src/connectionsignature.rs +++ b/src/connectionsignature.rs @@ -3,12 +3,19 @@ use sessionpolicy::SessionPolicy; use token::Token; +use std::fmt; #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct ConnectionSignature { pub token: Token, } +impl fmt::Display for ConnectionSignature { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + self.token.fmt(f) + } +} + impl ConnectionSignature { pub fn new(secret: &str) -> ConnectionSignature { ConnectionSignature {