Skip to content

Commit

Permalink
feat: Implement Display for Text
Browse files Browse the repository at this point in the history
  • Loading branch information
duesee committed Oct 10, 2023
1 parent c201cb3 commit e4f3ec4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions imap-types/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,12 @@ impl<'a> Debug for Text<'a> {
}
}

impl<'a> Display for Text<'a> {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
write!(f, "{}", self.0.as_ref())
}
}

impl<'a> Text<'a> {
pub fn validate(value: impl AsRef<[u8]>) -> Result<(), ValidationError> {
let value = value.as_ref();
Expand Down

0 comments on commit e4f3ec4

Please sign in to comment.