Merge pull request #2421 from brotzeit/clippy
apply some clippy suggestions
This commit is contained in:
commit
2bee88870f
@ -616,6 +616,7 @@ fn next(&mut self) -> Option<Self::Item> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
|
||||
// Creates an iterator over a list's items with associated comments.
|
||||
pub fn itemize_list<'a, T, I, F1, F2, F3>(
|
||||
codemap: &'a CodeMap,
|
||||
|
@ -200,7 +200,7 @@ pub fn visit_block(
|
||||
|
||||
let snippet = self.snippet(mk_sp(
|
||||
self.last_pos,
|
||||
attr_lo.unwrap_or(first_stmt.span.lo()),
|
||||
attr_lo.unwrap_or_else(|| first_stmt.span.lo()),
|
||||
));
|
||||
let len = CommentCodeSlices::new(snippet)
|
||||
.nth(0)
|
||||
@ -568,6 +568,7 @@ pub fn push_str(&mut self, s: &str) {
|
||||
self.buffer.push_str(s);
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(needless_pass_by_value))]
|
||||
fn push_rewrite_inner(&mut self, span: Span, rewrite: Option<String>) {
|
||||
if let Some(ref s) = rewrite {
|
||||
self.push_str(s);
|
||||
|
Loading…
Reference in New Issue
Block a user