1
Fork 0

Don't use .ok() before unwrapping via .expect() on a Result.

The Result can be expect-unwrapped directly. (clippy::ok_expect)
This commit is contained in:
Matthias Krüger 2020-03-04 13:36:49 +01:00
parent 2b0cfa5b4c
commit 07168f9cdc

View file

@ -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