Remove unnecessary sigils around Symbol::as_str() calls.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user