Skip to content

Commit e9ff319

Browse files
committed
Auto merge of #4284 - flip1995:rustfmt, r=phansch
Format code changelog: none
2 parents 0626674 + fc57b43 commit e9ff319

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

clippy_lints/src/double_comparison.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl<'a, 'tcx> DoubleComparisons {
6363
);
6464
}};
6565
}
66+
#[rustfmt::skip]
6667
match (op, lkind, rkind) {
6768
(BinOpKind::Or, BinOpKind::Eq, BinOpKind::Lt) | (BinOpKind::Or, BinOpKind::Lt, BinOpKind::Eq) => {
6869
lint_double_comparison!(<=)

mini-macro/src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
#![deny(rust_2018_idioms)]
33
extern crate proc_macro;
44

5-
use proc_macro::{TokenStream, quote};
5+
use proc_macro::{quote, TokenStream};
66

77
#[proc_macro_derive(ClippyMiniMacroTest)]
88
pub fn mini_macro(_: TokenStream) -> TokenStream {
99
quote!(
10-
#[allow(unused)] fn needless_take_by_value(s: String) { println!("{}", s.len()); }
11-
#[allow(unused)] fn needless_loop(items: &[u8]) {
10+
#[allow(unused)]
11+
fn needless_take_by_value(s: String) {
12+
println!("{}", s.len());
13+
}
14+
#[allow(unused)]
15+
fn needless_loop(items: &[u8]) {
1216
for i in 0..items.len() {
1317
println!("{}", items[i]);
1418
}

0 commit comments

Comments
 (0)