Run cargo fix --edition-idioms

This commit is contained in:
Amos Wenger 2022-07-20 15:02:08 +02:00
parent 23d25a3094
commit 816f7fe12a
230 changed files with 888 additions and 888 deletions

View file

@ -102,7 +102,7 @@ impl ModPath {
}
}
pub fn escaped(&self) -> EscapedModPath {
pub fn escaped(&self) -> EscapedModPath<'_> {
EscapedModPath(self)
}

View file

@ -21,7 +21,7 @@ enum Repr {
}
impl fmt::Display for Name {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match &self.0 {
Repr::Text(text) => fmt::Display::fmt(&text, f),
Repr::TupleField(idx) => fmt::Display::fmt(&idx, f),
@ -35,7 +35,7 @@ fn is_raw_identifier(name: &str) -> bool {
}
impl<'a> fmt::Display for EscapedName<'a> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match &self.0 .0 {
Repr::Text(text) => {
if is_raw_identifier(text) {
@ -142,7 +142,7 @@ impl Name {
}
}
pub fn escaped(&self) -> EscapedName {
pub fn escaped(&self) -> EscapedName<'_> {
EscapedName(self)
}
}