summaryrefslogtreecommitdiffstats
path: root/openpgp/src/message/lexer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/message/lexer.rs')
-rw-r--r--openpgp/src/message/lexer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/message/lexer.rs b/openpgp/src/message/lexer.rs
index 1bdc6c1f..b0a0c16b 100644
--- a/openpgp/src/message/lexer.rs
+++ b/openpgp/src/message/lexer.rs
@@ -48,7 +48,7 @@ pub enum Token {
impl fmt::Display for Token {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str(&format!("{:?}", self)[..])
+ write!(f, "{:?}", self)
}
}
@@ -59,7 +59,7 @@ pub enum LexicalError {
impl fmt::Display for LexicalError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.write_str(&format!("{:?}", self)[..])
+ write!(f, "{:?}", self)
}
}