Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions mcf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ mod base64;
mod error;
mod fields;

use core::fmt;
pub use error::{Error, Result};
pub use fields::{Field, Fields};

Expand Down Expand Up @@ -71,6 +72,12 @@ impl<'a> PasswordHashRef<'a> {
}
}

impl fmt::Display for PasswordHashRef<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(self.as_str())
}
}

impl<'a> From<PasswordHashRef<'a>> for &'a str {
fn from(hash: PasswordHashRef<'a>) -> &'a str {
hash.0
Expand Down