From 53acbf7de516183dce4170c7c324a8435180f2a0 Mon Sep 17 00:00:00 2001 From: TanZhou Date: Sat, 3 Oct 2020 14:50:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=BB=9F=E8=AE=A1=E5=A4=84=E7=90=86=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=95=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 2b5f59a..5b8cebc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,6 +20,8 @@ fn main() { fn decode(files: &Vec>) -> usize { let cfg = cfg::get(); + let mut count = 0usize; + let mut buf = [0; 16 * 1024]; for file in files { let mut origin = match fs::File::open(&file) { @@ -58,8 +60,9 @@ fn decode(files: &Vec>) -> usize { } } println!(r#"Ok : "{}""#, file.display()); + count += 1; } - 0 + count } fn get_all_files(target: &Path, recursive: bool) -> Vec> {