expose md5 in download output

This commit is contained in:
Robin Appelman 2024-01-26 21:41:53 +01:00
commit 70b2874d3b
4 changed files with 13 additions and 2 deletions

View file

@ -1,4 +1,5 @@
use clap::Parser;
use hex_fmt::HexFmt;
pub use tasmota_mqtt_client::{Result, TasmotaClient};
#[derive(Debug, Parser)]
@ -23,7 +24,7 @@ async fn main() -> Result<()> {
.download_config(&args.device, &args.device_password)
.await?;
println!("downloaded {}", file.name);
println!("downloaded {} with hash {}", file.name, HexFmt(file.md5));
if let Err(e) = std::fs::write(&file.name, file.data) {
eprintln!("Error while saving {}: {:#}", file.name, e);
}