Skip to content

Commit f5a5202

Browse files
authored
print pending check before hash calculation
1 parent 6f99435 commit f5a5202

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ fn main() {
7575
let filepath = args[1].clone();
7676
let hash = args[2].clone();
7777
let hash_type = identify_hash(&hash);
78-
let hash_result = calculate_hash(&hash_type, &filepath);
7978

8079
println!("{} {} {} {} {}",
8180
"Using".yellow(),
@@ -85,6 +84,8 @@ fn main() {
8584
"...".yellow()
8685
);
8786

87+
let hash_result = calculate_hash(&hash_type, &filepath);
88+
8889
match hash_result {
8990
Ok(result) => {
9091
if result == hash {
@@ -111,4 +112,4 @@ fn main() {
111112
},
112113
Err(e) => println!("{} {}", "Error calculating hash:".red(), e),
113114
}
114-
}
115+
}

0 commit comments

Comments
 (0)