1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-14 21:35:58 +02:00

Remove unnecessary match statement ()

This commit is contained in:
Joseph T. Lyons
2020-07-14 20:17:28 -04:00
committed by GitHub
parent 0934410b38
commit 5f1075544c

@ -801,10 +801,7 @@ pub async fn cli(
LineResult::CtrlC => { LineResult::CtrlC => {
let config_ctrlc_exit = config::config(Tag::unknown())? let config_ctrlc_exit = config::config(Tag::unknown())?
.get("ctrlc_exit") .get("ctrlc_exit")
.map(|s| match s.value.expect_string() { .map(|s| s.value.expect_string() == "true")
"true" => true,
_ => false,
})
.unwrap_or(false); // default behavior is to allow CTRL-C spamming similar to other shells .unwrap_or(false); // default behavior is to allow CTRL-C spamming similar to other shells
if !config_ctrlc_exit { if !config_ctrlc_exit {