also run rustfmt on clippy-lints
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user