Skip to content

Commit 41bad83

Browse files
committed
Merge pull request #475 from sanxiyn/unused-qualification
Remove unused qualifications
2 parents b45745e + 26f539e commit 41bad83

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/bit_mask.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ fn fetch_int_literal(cx: &LateContext, lit : &Expr) -> Option<u64> {
183183
match lit.node {
184184
ExprLit(ref lit_ptr) => {
185185
if let LitInt(value, _) = lit_ptr.node {
186-
Option::Some(value) //TODO: Handle sign
187-
} else { Option::None }
186+
Some(value) //TODO: Handle sign
187+
} else { None }
188188
}
189189
ExprPath(_, _) => {
190190
// Important to let the borrow expire before the const lookup to avoid double
@@ -195,8 +195,8 @@ fn fetch_int_literal(cx: &LateContext, lit : &Expr) -> Option<u64> {
195195
_ => None
196196
}
197197
}
198-
.and_then(|def_id| lookup_const_by_id(cx.tcx, def_id, Option::None))
198+
.and_then(|def_id| lookup_const_by_id(cx.tcx, def_id, None))
199199
.and_then(|l| fetch_int_literal(cx, l)),
200-
_ => Option::None
200+
_ => None
201201
}
202202
}

src/mut_mut.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ fn check_expr_mut(cx: &LateContext, expr: &Expr) {
3333

3434
fn unwrap_addr(expr: &Expr) -> Option<&Expr> {
3535
match expr.node {
36-
ExprAddrOf(MutMutable, ref e) => Option::Some(e),
37-
_ => Option::None
36+
ExprAddrOf(MutMutable, ref e) => Some(e),
37+
_ => None
3838
}
3939
}
4040

@@ -58,7 +58,7 @@ fn check_expr_mut(cx: &LateContext, expr: &Expr) {
5858

5959
fn unwrap_mut(ty: &Ty) -> Option<&Ty> {
6060
match ty.node {
61-
TyRptr(_, MutTy{ ty: ref pty, mutbl: MutMutable }) => Option::Some(pty),
62-
_ => Option::None
61+
TyRptr(_, MutTy{ ty: ref pty, mutbl: MutMutable }) => Some(pty),
62+
_ => None
6363
}
6464
}

src/mut_reference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn check_arguments(cx: &LateContext, arguments: &[P<Expr>], type_definition: &Ty
6060
match parameter.sty {
6161
TypeVariants::TyRef(_, TypeAndMut {ty: _, mutbl: MutImmutable}) |
6262
TypeVariants::TyRawPtr(TypeAndMut {ty: _, mutbl: MutImmutable}) => {
63-
if let Expr_::ExprAddrOf(MutMutable, _) = argument.node {
63+
if let ExprAddrOf(MutMutable, _) = argument.node {
6464
span_lint(cx, UNNECESSARY_MUT_PASSED,
6565
argument.span, &format!("The function/method \"{}\" \
6666
doesn't need a mutable reference",

0 commit comments

Comments
 (0)