diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-21 18:54:51 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@sequoia-pgp.org> | 2021-09-30 08:31:06 +0300 |
commit | 9bfda022641315914a0f03e4721f3a769660c00e (patch) | |
tree | 70f5bd8952395d004f1ceeb4749294a63d2db528 | |
parent | 7dea96c33715e762dec084fd30ddd5615133e746 (diff) |
Simplify writing out a literal {}
It's arguably simpler to write a format string that doesn't take
arguments than one with an argument that looks like a format string.
Found by clippy lint write_literal:
https://rust-lang.github.io/rust-clippy/master/index.html#write_literal
-rw-r--r-- | openpgp/src/regex/lexer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/regex/lexer.rs b/openpgp/src/regex/lexer.rs index 18300d90..ec1344ad 100644 --- a/openpgp/src/regex/lexer.rs +++ b/openpgp/src/regex/lexer.rs @@ -7,7 +7,7 @@ pub enum LexicalError { impl fmt::Display for LexicalError { // This trait requires `fmt` with this exact signature. fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", "{}") + f.write_str("{}") } } |