fix(build): complete strict lint and test cleanup (replacement for #476)

This commit is contained in:
Chummy 2026-02-17 23:19:55 +08:00
parent fc6e8eb521
commit 0aa35eb669
9 changed files with 24 additions and 34 deletions

View file

@ -9,6 +9,7 @@
use anyhow::Result;
use chrono::Local;
use rusqlite::{params, Connection};
use std::fmt::Write;
use std::fs;
use std::path::{Path, PathBuf};
@ -63,18 +64,17 @@ pub fn export_snapshot(workspace_dir: &Path) -> Result<usize> {
output.push_str(SNAPSHOT_HEADER);
let now = Local::now().format("%Y-%m-%d %H:%M:%S").to_string();
output.push_str(&format!("**Last exported:** {now}\n\n"));
output.push_str(&format!(
"**Total core memories:** {}\n\n---\n\n",
rows.len()
));
write!(output, "**Last exported:** {now}\n\n").unwrap();
write!(output, "**Total core memories:** {}\n\n---\n\n", rows.len()).unwrap();
for (key, content, _category, created_at, updated_at) in &rows {
output.push_str(&format!("### 🔑 `{key}`\n\n"));
output.push_str(&format!("{content}\n\n"));
output.push_str(&format!(
write!(output, "### 🔑 `{key}`\n\n").unwrap();
write!(output, "{content}\n\n").unwrap();
write!(
output,
"*Created: {created_at} | Updated: {updated_at}*\n\n---\n\n"
));
)
.unwrap();
}
let snapshot_path = snapshot_path(workspace_dir);