Skip to content

Commit

Permalink
Changed RANGE_FULL constant in utils
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyRoka committed May 2, 2020
1 parent e7138e0 commit de58c56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/match_on_vec_items.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::utils::{is_type_diagnostic_item, match_type, snippet, span_lint_and_sugg, walk_ptrs_ty};
use crate::utils::{self, is_type_diagnostic_item, match_type, snippet, span_lint_and_sugg, walk_ptrs_ty};
use if_chain::if_chain;
use rustc_errors::Applicability;
use rustc_hir::{Expr, ExprKind, MatchSource};
Expand Down Expand Up @@ -96,5 +96,5 @@ fn is_vector(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
fn is_full_range(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
let ty = cx.tables.expr_ty(expr);
let ty = walk_ptrs_ty(ty);
match_type(cx, ty, &["core", "ops", "range", "RangeFull"])
match_type(cx, ty, &utils::paths::RANGE_FULL)
}
2 changes: 1 addition & 1 deletion clippy_lints/src/utils/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub const RANGE: [&str; 3] = ["core", "ops", "Range"];
pub const RANGE_ARGUMENT_TRAIT: [&str; 3] = ["core", "ops", "RangeBounds"];
pub const RANGE_FROM: [&str; 3] = ["core", "ops", "RangeFrom"];
pub const RANGE_FROM_STD: [&str; 3] = ["std", "ops", "RangeFrom"];
pub const RANGE_FULL: [&str; 3] = ["core", "ops", "RangeFull"];
pub const RANGE_FULL: [&str; 4] = ["core", "ops", "range", "RangeFull"];
pub const RANGE_FULL_STD: [&str; 3] = ["std", "ops", "RangeFull"];
pub const RANGE_INCLUSIVE_NEW: [&str; 4] = ["core", "ops", "RangeInclusive", "new"];
pub const RANGE_INCLUSIVE_STD_NEW: [&str; 4] = ["std", "ops", "RangeInclusive", "new"];
Expand Down

0 comments on commit de58c56

Please sign in to comment.