feat: enhance strictness of Rust compiler settings and improve code quality by treating warnings as errors

This commit is contained in:
asepharyana
2026-07-13 06:22:31 +07:00
parent 3f5f27c339
commit 5334c2501b
20 changed files with 95 additions and 108 deletions
+2
View File
@@ -226,6 +226,7 @@ pub fn slug_path(memory_dir: &Path, raw: &str) -> PathBuf {
///
/// Return: `Ok(())` on success, or an `io::Error` from serialization or
/// the write.
#[cfg(test)]
pub fn export_lessons(memory_dir: &Path, output: &Path) -> std::io::Result<()> {
let names = Memory::list(memory_dir);
let lessons: Vec<Memory> = names.iter()
@@ -255,6 +256,7 @@ pub fn export_lessons(memory_dir: &Path, output: &Path) -> std::io::Result<()> {
/// import on the same file won't overwrite or duplicate existing memories.
///
/// Return: the number of memories actually imported (skips existing ones).
#[cfg(test)]
pub fn import_lessons(memory_dir: &Path, input: &Path) -> std::io::Result<usize> {
let data = std::fs::read_to_string(input)?;
let lessons: Vec<Memory> = serde_json::from_str(&data)