From 3cff06a0eb27dc5b6d208eb24fb22016222ea9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Fischer?= Date: Tue, 26 Mar 2019 13:57:03 -0300 Subject: [PATCH] Fix some test failures --- clippy_lints/src/ranges.rs | 3 +-- tests/compile-test.rs | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/clippy_lints/src/ranges.rs b/clippy_lints/src/ranges.rs index 87aeaf521028..84c9509844fc 100644 --- a/clippy_lints/src/ranges.rs +++ b/clippy_lints/src/ranges.rs @@ -161,8 +161,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { .ctxt() .outer() .expn_info() - .map(|info| info.call_site) - .unwrap_or(expr.span); + .map_or(expr.span, |info| info.call_site); span_lint_and_then( cx, RANGE_PLUS_ONE, diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 37a33911d9e6..33b410dbd99a 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -100,13 +100,13 @@ fn run_ui_toml_tests(config: &compiletest::Config, mut tests: Vec .position(|test| test.desc.name.to_string() == test_name.to_string()) .expect("The test should be in there"); let opts = libtest::TestOpts { - list: opts.list.clone(), + list: opts.list, filter: opts.filter.clone(), - filter_exact: opts.filter_exact.clone(), + filter_exact: opts.filter_exact, exclude_should_panic: Default::default(), run_ignored: libtest::RunIgnored::No, - run_tests: opts.run_tests.clone(), - bench_benchmarks: opts.bench_benchmarks.clone(), + run_tests: opts.run_tests, + bench_benchmarks: opts.bench_benchmarks, logfile: opts.logfile.clone(), nocapture: opts.nocapture, color: libtest::ColorConfig::AutoColor,