Remove unnecessary sigils around Symbol::as_str()
calls.
This commit is contained in:
parent
a89a063ba0
commit
ecd4919ebb
24 changed files with 34 additions and 34 deletions
|
@ -321,8 +321,8 @@ fn get_implementing_type<'a>(path: &QPath<'_>, candidates: &'a [&str], function:
|
|||
if let TyKind::Path(QPath::Resolved(None, tp)) = &ty.kind;
|
||||
if let [int] = &*tp.segments;
|
||||
then {
|
||||
let name = &int.ident.name.as_str();
|
||||
candidates.iter().find(|c| name == *c).copied()
|
||||
let name = int.ident.name.as_str();
|
||||
candidates.iter().find(|c| &name == *c).copied()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
@ -335,8 +335,8 @@ fn int_ty_to_sym<'tcx>(path: &QPath<'_>) -> Option<&'tcx str> {
|
|||
if let QPath::Resolved(_, path) = *path;
|
||||
if let [ty] = &*path.segments;
|
||||
then {
|
||||
let name = &ty.ident.name.as_str();
|
||||
INTS.iter().find(|c| name == *c).copied()
|
||||
let name = ty.ident.name.as_str();
|
||||
INTS.iter().find(|c| &name == *c).copied()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue