Skip to content

Commit 07168f9

Browse files
committed
Don't use .ok() before unwrapping via .expect() on a Result.
The Result can be expect-unwrapped directly. (clippy::ok_expect)
1 parent 2b0cfa5 commit 07168f9

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/librustc_codegen_llvm/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ pub unsafe fn create_module(
174174

175175
let llvm_data_layout = llvm::LLVMGetDataLayout(llmod);
176176
let llvm_data_layout = str::from_utf8(CStr::from_ptr(llvm_data_layout).to_bytes())
177-
.ok()
178177
.expect("got a non-UTF8 data-layout from LLVM");
179178

180179
// Unfortunately LLVM target specs change over time, and right now we

0 commit comments

Comments
 (0)