Skip to content

Commit c9ad0d1

Browse files
committed
Revert incorrect map(|x| *x) -> cloned() substitutions.
1 parent 539866b commit c9ad0d1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_back/rpath.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub fn get_rpath_flags<F, G>(config: RPathConfig<F, G>) -> Vec<String> where
4141

4242
let libs = config.used_crates.clone();
4343
let libs = libs.into_iter().filter_map(|(_, l)| {
44-
l.cloned()
44+
l.map(|p| p.clone())
4545
}).collect::<Vec<_>>();
4646

4747
let rpaths = get_rpaths(config, &libs[]);

src/libtest/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ fn calc_result(desc: &TestDesc, task_result: Result<(), Box<Any+Send>>) -> TestR
938938
(&ShouldFail::Yes(Some(msg)), Err(ref err))
939939
if err.downcast_ref::<String>()
940940
.map(|e| &**e)
941-
.or_else(|| err.downcast_ref::<&'static str>().cloned())
941+
.or_else(|| err.downcast_ref::<&'static str>().map(|e| *e))
942942
.map(|e| e.contains(msg))
943943
.unwrap_or(false) => TrOk,
944944
_ => TrFailed,

0 commit comments

Comments
 (0)