diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-04 13:36:49 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-04 20:33:47 +0100 |
| commit | 07168f9cdcaae65550ea04395bef1258e8bbe9c3 (patch) | |
| tree | f5b52dc2d6198b172527030f41d40a078f9f9208 /src/librustc_codegen_llvm | |
| parent | 2b0cfa5b4c5099f45ca540ee1c7d8c1ecd5267d2 (diff) | |
| download | rust-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.rs | 1 |
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 |
