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

Appearance settings

Commit d28fe8c

Browse filesBrowse files
committed
Improve code formatting by introducing temp bindings
1 parent c3d422a commit d28fe8c
Copy full SHA for d28fe8c

File tree

Expand file treeCollapse file tree

1 file changed

+4
-11
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-11
lines changed

‎src/builder/bootloader.rs

Copy file name to clipboardExpand all lines: src/builder/bootloader.rs
+4-11Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,10 @@ impl BuildConfig {
6060
.and_then(|t| t.get("bootloader"))
6161
.and_then(|t| t.get("build-std"));
6262
if let Some(key) = key {
63-
Some(
64-
key.as_str()
65-
.ok_or_else(|| {
66-
BootloaderError::BootloaderInvalid(
67-
"A non-string `package.metadata.bootloader.build-std` key found in \
68-
Cargo.toml of bootloader"
69-
.into(),
70-
)
71-
})?
72-
.into(),
73-
)
63+
let err_msg = "A non-string `package.metadata.bootloader.build-std` key found in \
64+
Cargo.toml of bootloader";
65+
let err = || BootloaderError::BootloaderInvalid(err_msg.into());
66+
Some(key.as_str().ok_or_else(err)?.into())
7467
} else {
7568
None
7669
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.