Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3cb6e6f

Browse files
ChocolateLoverRajFreax13
andauthored
Use Result::ok (#496)
* Use `Result::ok` * Update uefi/src/main.rs --------- Co-authored-by: Tom Dohrmann <Erbse.13@gmx.de>
1 parent 55918ea commit 3cb6e6f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎uefi/src/main.rs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,7 @@ fn load_file_from_disk(
313313

314314
let file_handle_result = root.open(filename, FileMode::Read, FileAttribute::empty());
315315

316-
let file_handle = match file_handle_result {
317-
Err(_) => return None,
318-
Ok(handle) => handle,
319-
};
316+
let file_handle = file_handle_result.ok()?;
320317

321318
let mut file = match file_handle.into_type().unwrap() {
322319
uefi::proto::media::file::FileType::Regular(f) => f,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /