From 0f71a150ff292b1f18b30c7aa75dc8b3d48d2b8e Mon Sep 17 00:00:00 2001 From: mo8it Date: Mon, 26 Aug 2024 22:03:09 +0200 Subject: [PATCH] Making code prettier :P --- src/main.rs | 4 +--- src/term.rs | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 998d3d11..e8f274b0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -71,9 +71,7 @@ fn main() -> Result<()> { } match args.command { - Some(Subcommands::Init) => { - return init::init().context("Initialization failed"); - } + Some(Subcommands::Init) => return init::init().context("Initialization failed"), Some(Subcommands::Dev(dev_command)) => return dev_command.run(), _ => (), } diff --git a/src/term.rs b/src/term.rs index fa71ac65..0416c30e 100644 --- a/src/term.rs +++ b/src/term.rs @@ -153,8 +153,7 @@ pub fn clear_terminal(stdout: &mut StdoutLock) -> io::Result<()> { pub fn press_enter_prompt(stdout: &mut StdoutLock) -> io::Result<()> { stdout.flush()?; io::stdin().lock().read_until(b'\n', &mut Vec::new())?; - stdout.write_all(b"\n")?; - Ok(()) + stdout.write_all(b"\n") } pub fn terminal_file_link<'a>(