From 2f99d09ef7b622286d9eedef1366399cdcca4d6d Mon Sep 17 00:00:00 2001 From: ljedrz Date: Mon, 29 Oct 2018 10:19:09 +0100 Subject: [PATCH] codegen_llvm_back: simplify a conversion to char --- src/librustc_codegen_llvm/back/link.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_codegen_llvm/back/link.rs b/src/librustc_codegen_llvm/back/link.rs index 5e12c70753c3..111637b6aa96 100644 --- a/src/librustc_codegen_llvm/back/link.rs +++ b/src/librustc_codegen_llvm/back/link.rs @@ -806,7 +806,7 @@ fn link_natively(sess: &Session, let mut x = "Non-UTF-8 output: ".to_string(); x.extend(s.iter() .flat_map(|&b| ascii::escape_default(b)) - .map(|b| char::from_u32(b as u32).unwrap())); + .map(char::from)); x }) }