Skip to content

Commit

Permalink
print pending check before hash calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ibnaleem authored Jan 26, 2025
1 parent 6f99435 commit f5a5202
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ fn main() {
let filepath = args[1].clone();
let hash = args[2].clone();
let hash_type = identify_hash(&hash);
let hash_result = calculate_hash(&hash_type, &filepath);

println!("{} {} {} {} {}",
"Using".yellow(),
Expand All @@ -85,6 +84,8 @@ fn main() {
"...".yellow()
);

let hash_result = calculate_hash(&hash_type, &filepath);

match hash_result {
Ok(result) => {
if result == hash {
Expand All @@ -111,4 +112,4 @@ fn main() {
},
Err(e) => println!("{} {}", "Error calculating hash:".red(), e),
}
}
}

0 comments on commit f5a5202

Please sign in to comment.