diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-27 18:57:47 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@sequoia-pgp.org> | 2021-09-30 08:31:12 +0300 |
commit | 28394a99d39d9c46a9cb6e746159b5ae56871737 (patch) | |
tree | ac488f2fcf31c7454fd93f65a82037b10b94eacb | |
parent | d7cb7da07661ce42c36ba2dd4bc0edcad11a7e81 (diff) |
Drop unnecessary to_string() methods
The methods were shadowing the implementation of the same function via
the Display trait. One implementation is enough.
Found by the clippy trait inherent_to_string_shadow_display:
https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string_shadow_display
-rw-r--r-- | ipc/src/sexp/parse/lexer.rs | 6 | ||||
-rw-r--r-- | openpgp/src/regex/lexer.rs | 4 |
2 files changed, 0 insertions, 10 deletions
diff --git a/ipc/src/sexp/parse/lexer.rs b/ipc/src/sexp/parse/lexer.rs index bd641fef..b4eae979 100644 --- a/ipc/src/sexp/parse/lexer.rs +++ b/ipc/src/sexp/parse/lexer.rs @@ -54,12 +54,6 @@ impl<'a> From<Token<'a>> for String { } } -impl<'a> Token<'a> { - pub fn to_string(self) -> String { - self.into() - } -} - #[derive(Debug)] pub(crate) struct Lexer<'input> { offset: usize, diff --git a/openpgp/src/regex/lexer.rs b/openpgp/src/regex/lexer.rs index ec1344ad..3d6c1e45 100644 --- a/openpgp/src/regex/lexer.rs +++ b/openpgp/src/regex/lexer.rs @@ -75,10 +75,6 @@ impl From<Token> for String { } impl Token { - pub fn to_string(self) -> String { - self.into() - } - pub fn to_char(&self) -> char { use self::Token::*; match self { |