chore: Remove blocking read strings

This commit is contained in:
Jayson Reis 2026-02-18 15:52:07 +00:00 committed by Chummy
parent bc0be9a3c1
commit b9af601943
26 changed files with 331 additions and 243 deletions

View file

@ -608,7 +608,7 @@ exit 1
.iter()
.any(|e| e.content.contains("Rust should stay local-first")));
let context_calls = fs::read_to_string(&marker).unwrap_or_default();
let context_calls = tokio::fs::read_to_string(&marker).await.unwrap_or_default();
assert!(
context_calls.trim().is_empty(),
"Expected local-hit short-circuit; got calls: {context_calls}"
@ -669,7 +669,7 @@ exit 1
assert!(first.is_empty());
assert!(second.is_empty());
let calls = fs::read_to_string(&marker).unwrap_or_default();
let calls = tokio::fs::read_to_string(&marker).await.unwrap_or_default();
assert_eq!(calls.lines().count(), 1);
}
}

View file

@ -229,7 +229,6 @@ impl Memory for MarkdownMemory {
#[cfg(test)]
mod tests {
use super::*;
use std::fs as sync_fs;
use tempfile::TempDir;
fn temp_workspace() -> (TempDir, MarkdownMemory) {
@ -256,7 +255,7 @@ mod tests {
mem.store("pref", "User likes Rust", MemoryCategory::Core, None)
.await
.unwrap();
let content = sync_fs::read_to_string(mem.core_path()).unwrap();
let content = fs::read_to_string(mem.core_path()).await.unwrap();
assert!(content.contains("User likes Rust"));
}
@ -267,7 +266,7 @@ mod tests {
.await
.unwrap();
let path = mem.daily_path();
let content = sync_fs::read_to_string(path).unwrap();
let content = fs::read_to_string(path).await.unwrap();
assert!(content.contains("Finished tests"));
}