Skip to content

Commit eee41af

Browse files
committed
fix readability issue from PR feedback
1 parent cec6952 commit eee41af

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

crates/volta-core/src/hook/serial.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ impl RawResolveHook {
8787
impl RawIndexHook {
8888
pub fn into_index_hook(self, base_dir: &Path) -> Fallible<tool::YarnIndexHook> {
8989
// use user-specified format, or default to Github (legacy)
90-
let format = if let Some(format_str) = self.format {
91-
RegistryFormat::from_str(&format_str)?
92-
} else {
93-
RegistryFormat::Github
90+
let format = match self.format {
91+
Some(format_str) => RegistryFormat::from_str(&format_str)?,
92+
None => RegistryFormat::Github,
9493
};
9594
Ok(tool::YarnIndexHook {
9695
format,

0 commit comments

Comments
 (0)