From b5c60d8c01fce2e02b7b2563cb7fcc1b915430ee Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Fri, 5 Apr 2024 11:06:11 +0800 Subject: [PATCH] Fix `--stdin` not do format #31 --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5b3f5e7..ff5db3e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ fn main() -> Result<(), Box> { if cli.stdin { let mut source = String::new(); std::io::stdin().read_to_string(&mut source).expect("failed read source from stdin"); - println!("{}", source); + println!("{}", format(&source).expect("failed to format source")); } else { process_files(cli.file)?; }