Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/frequency/frequency_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{collections::HashMap, path::PathBuf};
use console::Term;
use isolang::Language;

use crate::utils::{decompress_gzip, download_with_progress, hash_url, read_file, write_file};
use crate::utils::{decompress_gzip, download_with_progress, hash_url, read_file};

pub struct FrequencyMap {
map: HashMap<String, u32>,
Expand Down Expand Up @@ -52,8 +52,6 @@ impl FrequencyMap {
term.clear_line()?;
term.write_line("✅ Download complete")?;

write_file(&file_path, &content)?;

content
}
};
Expand Down
4 changes: 1 addition & 3 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ pub async fn download_with_progress(url: &str, output_path: &PathBuf) -> anyhow:
pb.finish_and_clear();

// Cache the downloaded content
let mut file = File::create(&output_path)?;

file.write_all(&content)?;
write_file(output_path, &content)?;

Ok(content)
}
Expand Down