From b5f88588253c28f8bb75cacc1c8fd1155bb33af9 Mon Sep 17 00:00:00 2001 From: Minseong Jang Date: Thu, 24 Feb 2022 19:00:28 +0900 Subject: [PATCH] Fix `-o` option --- bin/kecc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/kecc.rs b/bin/kecc.rs index 3041918..1b75af6 100644 --- a/bin/kecc.rs +++ b/bin/kecc.rs @@ -86,7 +86,7 @@ fn main() { let mut output: Box = if output == "-" { Box::new(::std::io::stdout()) } else { - Box::new(ok_or_exit!(::std::fs::File::open(output), 1)) + Box::new(ok_or_exit!(::std::fs::File::create(output), 1)) }; let ext = input.extension();