1.65 clippy fixes

This commit is contained in:
Folkert 2022-11-03 16:20:37 +01:00
parent f0d6e418fa
commit 66a1ba00eb
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
53 changed files with 224 additions and 225 deletions

View file

@ -109,7 +109,7 @@ pub enum StrSegment<'a> {
Interpolated(Loc<&'a Expr<'a>>), // e.g. (name) in "Hi, \(name)!"
}
#[derive(Clone, Copy, Debug, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EscapedChar {
Newline, // \n
Tab, // \t
@ -581,7 +581,7 @@ pub enum AssignedField<'a, Val> {
Malformed(&'a str),
}
#[derive(Clone, Copy, Debug, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CommentOrNewline<'a> {
Newline,
LineComment(&'a str),
@ -880,7 +880,7 @@ impl<'a, T> Collection<'a, T> {
pub fn final_comments(&self) -> &'a [CommentOrNewline<'a>] {
if let Some(final_comments) = self.final_comments {
*final_comments
final_comments
} else {
&[]
}