also run rustfmt on clippy-lints

This commit is contained in:
Oliver Schneider
2016-12-20 18:21:30 +01:00
parent 4d0864b277
commit 4a4e1ea2c5
72 changed files with 1017 additions and 1204 deletions

View File

@@ -78,7 +78,10 @@ pub struct EnumVariantNames {
impl EnumVariantNames {
pub fn new(threshold: u64) -> EnumVariantNames {
EnumVariantNames { modules: Vec::new(), threshold: threshold }
EnumVariantNames {
modules: Vec::new(),
threshold: threshold,
}
}
}
@@ -108,8 +111,8 @@ fn partial_rmatch(post: &str, name: &str) -> usize {
// FIXME: #600
#[allow(while_let_on_iterator)]
fn check_variant(cx: &EarlyContext, threshold: u64, def: &EnumDef, item_name: &str,
item_name_chars: usize, span: Span) {
fn check_variant(cx: &EarlyContext, threshold: u64, def: &EnumDef, item_name: &str, item_name_chars: usize,
span: Span) {
if (def.variants.len() as u64) < threshold {
return;
}
@@ -200,7 +203,10 @@ impl EarlyLintPass for EnumVariantNames {
if !mod_camel.is_empty() {
if mod_name == &item_name {
if let ItemKind::Mod(..) = item.node {
span_lint(cx, MODULE_INCEPTION, item.span, "module has the same name as its containing module");
span_lint(cx,
MODULE_INCEPTION,
item.span,
"module has the same name as its containing module");
}
}
if item.vis == Visibility::Public {