Merge pull request #1788 from zed-industries/style

Apply a slight stylistic tweak
This commit is contained in:
Nathan Sobo 2022-10-20 18:43:50 -06:00 committed by GitHub
commit 77b13b1356
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -301,9 +301,7 @@ impl Keystroke {
}
}
if key.is_none() {
return Err(anyhow!("Invalid keystroke `{}`", source));
}
let key = key.ok_or_else(|| anyhow!("Invalid keystroke `{}`", source))?;
Ok(Keystroke {
ctrl,
@ -311,7 +309,7 @@ impl Keystroke {
shift,
cmd,
function,
key: key.unwrap(),
key,
})
}