YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
style: cargo fmt on bash_env, favorites, connections_api
Louis Beaumont0803d3dc141f
diff --git a/crates/screenpipe-core/src/agents/bash_env.rs b/crates/screenpipe-core/src/agents/bash_env.rsindex 3a19e72b1..1c3482b40 100644--- a/crates/screenpipe-core/src/agents/bash_env.rs+++ b/crates/screenpipe-core/src/agents/bash_env.rs@@ -136,7 +136,10 @@ mod tests {let mtime2 = std::fs::metadata(&second).unwrap().modified().unwrap();assert_eq!(first, second);// content unchanged → we did not rewrite the file- assert_eq!(mtime1, mtime2, "wrapper should not be rewritten when content matches");+ assert_eq!(+ mtime1, mtime2,+ "wrapper should not be rewritten when content matches"+ );}#[test]diff --git a/crates/screenpipe-core/src/pipes/favorites.rs b/crates/screenpipe-core/src/pipes/favorites.rsindex c1d1c094a..5b6c03c00 100644--- a/crates/screenpipe-core/src/pipes/favorites.rs+++ b/crates/screenpipe-core/src/pipes/favorites.rs@@ -58,9 +58,7 @@ pub fn load(pipes_dir: &Path) -> Vec<String> {/// input are collapsed but order is preserved.pub fn save(pipes_dir: &Path, favorites: &[String]) -> Result<()> {let deduped = dedup_preserve(favorites.to_vec());- let file = FavoritesFile {- favorites: deduped,- };+ let file = FavoritesFile { favorites: deduped };let final_path = path(pipes_dir);let tmp_path = pipes_dir.join(TMP_FILE);@@ -70,19 +68,10 @@ pub fn save(pipes_dir: &Path, favorites: &[String]) -> Result<()> {}let json = serde_json::to_string_pretty(&file)?;- std::fs::write(&tmp_path, json).with_context(|| {- format!(- "writing favorites tempfile at {}",- tmp_path.display()- )- })?;- std::fs::rename(&tmp_path, &final_path).with_context(|| {- format!(- "renaming {} → {}",- tmp_path.display(),- final_path.display()- )- })?;+ std::fs::write(&tmp_path, json)+ .with_context(|| format!("writing favorites tempfile at {}", tmp_path.display()))?;+ std::fs::rename(&tmp_path, &final_path)+ .with_context(|| format!("renaming {} → {}", tmp_path.display(), final_path.display()))?;Ok(())}@@ -229,7 +218,11 @@ mod tests {fn save_dedupes_input() {let d = tmpdir();// A caller passes duplicates — we collapse but keep first-seen order.- save(d.path(), &["a".into(), "b".into(), "a".into(), "c".into(), "b".into()]).unwrap();+ save(+ d.path(),+ &["a".into(), "b".into(), "a".into(), "c".into(), "b".into()],+ )+ .unwrap();assert_eq!(load(d.path()), vec!["a", "b", "c"]);}diff --git a/crates/screenpipe-engine/src/connections_api.rs b/crates/screenpipe-engine/src/connections_api.rsindex 73c8d8186..2032820de 100644--- a/crates/screenpipe-engine/src/connections_api.rs+++ b/crates/screenpipe-engine/src/connections_api.rs@@ -1174,12 +1174,9 @@ async fn connection_proxy(// forwarded verbatim — without this, callers silently hit defaults and// bad requests like 400s on `values:append`.let target_url = match raw_query.as_deref() {- Some(q) if !q.is_empty() => format!(- "{}/{}?{}",- base_url,- api_path.trim_start_matches('/'),- q- ),+ Some(q) if !q.is_empty() => {+ format!("{}/{}?{}", base_url, api_path.trim_start_matches('/'), q)+ }_ => format!("{}/{}", base_url, api_path.trim_start_matches('/')),};