Skip to content

Commit

Permalink
Implement Display for ConnectionSignature
Browse files Browse the repository at this point in the history
  • Loading branch information
therealbstern committed May 10, 2018
1 parent 96417d2 commit a3f7273
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "websession"
version = "0.8.0"
version = "0.8.1"
authors = ["Jeff Olhoeft <[email protected]>", "Ben Stern <[email protected]>"]
description = "Web Session Support for Rust"
license = "MIT/Apache-2.0"
Expand Down
7 changes: 7 additions & 0 deletions src/connectionsignature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a3f7273

Please sign in to comment.