]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/tabs_in_doc_comments.rs
Auto merge of #9148 - arieluy:then_some_unwrap_or, r=Jarcho
[rust.git] / clippy_lints / src / tabs_in_doc_comments.rs
index c9b4b245f4cc25019d130f05b33151bf80a81bdf..e223aea297fc478bf9816be4ec8f4e73a65b6391 100644 (file)
@@ -4,7 +4,6 @@
 use rustc_lint::{EarlyContext, EarlyLintPass};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
 use rustc_span::source_map::{BytePos, Span};
-use std::convert::TryFrom;
 
 declare_clippy_lint! {
     /// ### What it does
@@ -64,7 +63,7 @@ fn warn_if_tabs_in_doc(cx: &EarlyContext<'_>, attr: &ast::Attribute) {
         if let ast::AttrKind::DocComment(_, comment) = attr.kind {
             let comment = comment.as_str();
 
-            for (lo, hi) in get_chunks_of_tabs(&comment) {
+            for (lo, hi) in get_chunks_of_tabs(comment) {
                 // +3 skips the opening delimiter
                 let new_span = Span::new(
                     attr.span.lo() + BytePos(3 + lo),