style(src-tauri): cargo fmt

Pure mechanical rustfmt reformat (default config, no rustfmt.toml).
This commit is contained in:
soubarna
2026-10-05 17:19:13 +05:30
parent e1031b3ecc
commit b6cf46b883
27 changed files with 4430 additions and 1042 deletions
+7 -3
View File
@@ -7,14 +7,18 @@ use std::path::{Path, PathBuf};
const ENV_VAR: &str = "VOICED_SELFTEST_OUT";
fn configured_path() -> Option<PathBuf> {
std::env::var_os(ENV_VAR).filter(|v| !v.is_empty()).map(PathBuf::from)
std::env::var_os(ENV_VAR)
.filter(|v| !v.is_empty())
.map(PathBuf::from)
}
fn write_report(path: &Path, json: &str) -> Result<(), String> {
if let Some(parent) = path.parent() {
std::fs::create_dir_all(parent).map_err(|e| format!("Could not create {}: {e}", parent.display()))?;
std::fs::create_dir_all(parent)
.map_err(|e| format!("Could not create {}: {e}", parent.display()))?;
}
let mut file = std::fs::File::create(path).map_err(|e| format!("Could not write the report: {e}"))?;
let mut file =
std::fs::File::create(path).map_err(|e| format!("Could not write the report: {e}"))?;
file.write_all(json.as_bytes())
.and_then(|()| file.sync_all())
.map_err(|e| format!("Could not write the report: {e}"))