about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-03-04 13:36:49 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-03-04 20:33:47 +0100
commit07168f9cdcaae65550ea04395bef1258e8bbe9c3 (patch)
treef5b52dc2d6198b172527030f41d40a078f9f9208 /src/librustc_codegen_llvm
parent2b0cfa5b4c5099f45ca540ee1c7d8c1ecd5267d2 (diff)
downloadrust-07168f9cdcaae65550ea04395bef1258e8bbe9c3.tar.gz
rust-07168f9cdcaae65550ea04395bef1258e8bbe9c3.zip
Don't use .ok() before unwrapping via .expect() on a Result.
The Result can be expect-unwrapped directly. (clippy::ok_expect)
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/context.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs
index 46f461b98c8..3466363ac79 100644
--- a/src/librustc_codegen_llvm/context.rs
+++ b/src/librustc_codegen_llvm/context.rs
@@ -174,7 +174,6 @@ pub unsafe fn create_module(
 
         let llvm_data_layout = llvm::LLVMGetDataLayout(llmod);
         let llvm_data_layout = str::from_utf8(CStr::from_ptr(llvm_data_layout).to_bytes())
-            .ok()
             .expect("got a non-UTF8 data-layout from LLVM");
 
         // Unfortunately LLVM target specs change over time, and right now we