X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=clippy_lints%2Fsrc%2Fok_if_let.rs;h=e060220d56b31840cd56a8ad388af989a89d43cd;hb=4d60841205d10293d6759df1948acda4c607c7eb;hp=0a1399075e067886b508c9264e003aba6f5c93fa;hpb=847e4dcc0d21ccea018629e46dd0baf4939a8261;p=rust.git diff --git a/clippy_lints/src/ok_if_let.rs b/clippy_lints/src/ok_if_let.rs index 0a1399075e0..e060220d56b 100644 --- a/clippy_lints/src/ok_if_let.rs +++ b/clippy_lints/src/ok_if_let.rs @@ -1,6 +1,17 @@ -use rustc::lint::*; -use rustc::hir::*; +// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + use crate::utils::{match_type, method_chain_args, paths, snippet, span_help_and_lint}; +use if_chain::if_chain; +use rustc::hir::*; +use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; +use rustc::{declare_tool_lint, lint_array}; /// **What it does:*** Checks for unnecessary `ok()` in if let. ///