Remove unnecessary sigils around Symbol::as_str()
calls.
This commit is contained in:
parent
8cddcd39ba
commit
056d48a2c9
104 changed files with 189 additions and 192 deletions
|
@ -127,7 +127,7 @@ impl HiddenUnicodeCodepoints {
|
|||
impl EarlyLintPass for HiddenUnicodeCodepoints {
|
||||
fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &ast::Attribute) {
|
||||
if let ast::AttrKind::DocComment(_, comment) = attr.kind {
|
||||
if contains_text_flow_control_chars(&comment.as_str()) {
|
||||
if contains_text_flow_control_chars(comment.as_str()) {
|
||||
self.lint_text_direction_codepoint(cx, comment, attr.span, 0, false, "doc comment");
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ impl EarlyLintPass for HiddenUnicodeCodepoints {
|
|||
let (text, span, padding) = match &expr.kind {
|
||||
ast::ExprKind::Lit(ast::Lit { token, kind, span }) => {
|
||||
let text = token.symbol;
|
||||
if !contains_text_flow_control_chars(&text.as_str()) {
|
||||
if !contains_text_flow_control_chars(text.as_str()) {
|
||||
return;
|
||||
}
|
||||
let padding = match kind {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue