Remove unnecessary path prefixes (#4492)

This commit is contained in:
Charlie Marsh 2023-05-18 10:19:09 -04:00 committed by GitHub
parent a8d080c825
commit e8e66f3824
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 252 additions and 324 deletions

View file

@ -915,7 +915,7 @@ impl<'a> From<&'a Stmt> for ComparableStmt<'a> {
body: body.iter().map(Into::into).collect(),
decorator_list: decorator_list.iter().map(Into::into).collect(),
returns: returns.as_ref().map(Into::into),
type_comment: type_comment.as_ref().map(std::string::String::as_str),
type_comment: type_comment.as_ref().map(String::as_str),
},
Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef {
name,
@ -931,7 +931,7 @@ impl<'a> From<&'a Stmt> for ComparableStmt<'a> {
body: body.iter().map(Into::into).collect(),
decorator_list: decorator_list.iter().map(Into::into).collect(),
returns: returns.as_ref().map(Into::into),
type_comment: type_comment.as_ref().map(std::string::String::as_str),
type_comment: type_comment.as_ref().map(String::as_str),
},
Stmt::ClassDef(ast::StmtClassDef {
name,
@ -967,7 +967,7 @@ impl<'a> From<&'a Stmt> for ComparableStmt<'a> {
}) => Self::Assign {
targets: targets.iter().map(Into::into).collect(),
value: value.into(),
type_comment: type_comment.as_ref().map(std::string::String::as_str),
type_comment: type_comment.as_ref().map(String::as_str),
},
Stmt::AugAssign(ast::StmtAugAssign {
target,

View file

@ -295,8 +295,8 @@ impl OneIndexed {
}
}
impl std::fmt::Display for OneIndexed {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
impl fmt::Display for OneIndexed {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
std::fmt::Debug::fmt(&self.0.get(), f)
}
}