Skip to content

Commit 3bb5f81

Browse files
committed
Remove unnecessary sigils around Symbol::as_str() calls.
1 parent b4afb38 commit 3bb5f81

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/attr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl Rewrite for ast::Attribute {
337337
} else {
338338
let should_skip = self
339339
.ident()
340-
.map(|s| context.skip_context.skip_attribute(&s.name.as_str()))
340+
.map(|s| context.skip_context.skip_attribute(s.name.as_str()))
341341
.unwrap_or(false);
342342
let prefix = attr_prefix(self);
343343

@@ -356,7 +356,7 @@ impl Rewrite for ast::Attribute {
356356

357357
let literal_str = literal.as_str();
358358
let doc_comment_formatter =
359-
DocCommentFormatter::new(&*literal_str, comment_style);
359+
DocCommentFormatter::new(literal_str, comment_style);
360360
let doc_comment = format!("{}", doc_comment_formatter);
361361
return rewrite_doc_comment(
362362
&doc_comment,

src/modules.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
455455

456456
fn push_inline_mod_directory(&mut self, id: symbol::Ident, attrs: &[ast::Attribute]) {
457457
if let Some(path) = find_path_value(attrs) {
458-
self.directory.path.push(&*path.as_str());
458+
self.directory.path.push(path.as_str());
459459
self.directory.ownership = DirectoryOwnership::Owned { relative: None };
460460
} else {
461461
// We have to push on the current module name in the case of relative

src/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ fn is_skip(meta_item: &MetaItem) -> bool {
260260
match meta_item.kind {
261261
MetaItemKind::Word => {
262262
let path_str = pprust::path_to_string(&meta_item.path);
263-
path_str == *skip_annotation().as_str() || path_str == *depr_skip_annotation().as_str()
263+
path_str == skip_annotation().as_str() || path_str == depr_skip_annotation().as_str()
264264
}
265265
MetaItemKind::List(ref l) => {
266266
meta_item.has_name(sym::cfg_attr) && l.len() == 2 && is_skip_nested(&l[1])

0 commit comments

Comments
 (0)