refact rust
This commit is contained in:
@@ -202,7 +202,7 @@ async fn translate_folder(dir: &Path, from: &str, to: &str) -> Result<()> {
|
||||
match translate_file(path, from, to).await {
|
||||
Ok(_) => {
|
||||
// Check if it was actually translated or skipped
|
||||
let content = fs::read_to_string(&path)?;
|
||||
let content = fs::read_to_string(path)?;
|
||||
let record: serde_json::Value = serde_json::from_str(&content)?;
|
||||
let value = record.get("value").unwrap_or(&record);
|
||||
if value
|
||||
|
||||
Reference in New Issue
Block a user