Skip to content

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

chore(ci): cargo fmt + add on_screen=None to test callsites + machete ignore

Louis Beaumontb0b22fd6fba7
diff --git a/crates/screenpipe-a11y/src/tree/linux_lines.rs b/crates/screenpipe-a11y/src/tree/linux_lines.rs
index c1aac1373..c7340032b 100644
--- a/crates/screenpipe-a11y/src/tree/linux_lines.rs
+++ b/crates/screenpipe-a11y/src/tree/linux_lines.rs
@@ -65,7 +65,12 @@ pub(crate) struct NormalizeRefs {
impl NormalizeRefs {
pub fn normalize(&self, x: f64, y: f64, w: f64, h: f64) -> Option<NodeBounds> {
let (rx, ry, rw, rh) = if self.monitor_w > 0.0 && self.monitor_h > 0.0 {
- (self.monitor_x, self.monitor_y, self.monitor_w, self.monitor_h)
+ (
+ self.monitor_x,
+ self.monitor_y,
+ self.monitor_w,
+ self.monitor_h,
+ )
} else if self.window_w > 0.0 && self.window_h > 0.0 {
(self.window_x, self.window_y, self.window_w, self.window_h)
} else {
diff --git a/crates/screenpipe-a11y/src/tree/macos_lines.rs b/crates/screenpipe-a11y/src/tree/macos_lines.rs
index 33be6478c..6f82018f2 100644
--- a/crates/screenpipe-a11y/src/tree/macos_lines.rs
+++ b/crates/screenpipe-a11y/src/tree/macos_lines.rs
@@ -60,9 +60,8 @@ fn copy_param_attr(
parameter: &cf::Type,
) -> Option<arc::R<cf::Type>> {
let mut out: Option<arc::R<cf::Type>> = None;
- let status = unsafe {
- AXUIElementCopyParameterizedAttributeValue(elem, attr_name, parameter, &mut out)
- };
+ let status =
+ unsafe { AXUIElementCopyParameterizedAttributeValue(elem, attr_name, parameter, &mut out) };
if status.is_ok() {
out
} else {
@@ -237,7 +236,12 @@ pub(crate) struct NormalizeRefs {
impl NormalizeRefs {
pub fn normalize(&self, x: f64, y: f64, w: f64, h: f64) -> Option<NodeBounds> {
let (rx, ry, rw, rh) = if self.monitor_w > 0.0 && self.monitor_h > 0.0 {
- (self.monitor_x, self.monitor_y, self.monitor_w, self.monitor_h)
+ (
+ self.monitor_x,
+ self.monitor_y,
+ self.monitor_w,
+ self.monitor_h,
+ )
} else if self.window_w > 0.0 && self.window_h > 0.0 {
(self.window_x, self.window_y, self.window_w, self.window_h)
} else {
@@ -500,7 +504,9 @@ mod tests {
window_w: 800.0,
window_h: 600.0,
};
- let nb = refs.normalize(100.0, 100.0, 400.0, 300.0).expect("normalizes");
+ let nb = refs
+ .normalize(100.0, 100.0, 400.0, 300.0)
+ .expect("normalizes");
assert!((nb.width - 0.5).abs() < 1e-6);
assert!((nb.height - 0.5).abs() < 1e-6);
}
diff --git a/crates/screenpipe-a11y/src/tree/mod.rs b/crates/screenpipe-a11y/src/tree/mod.rs
index bee76f09b..32051ba80 100644
--- a/crates/screenpipe-a11y/src/tree/mod.rs
+++ b/crates/screenpipe-a11y/src/tree/mod.rs
@@ -786,7 +786,7 @@ mod tests {
// ratio of 0.5 doesn't make sense; should clamp to 1.0 so threshold
// becomes the bare aspect-ratio capacity.
let bounds = bb(0.5, 0.1); // chars_per_line_est ≈ 14.5
- // 16 chars > 14.5 → should be multi-line even with ratio < 1.
+ // 16 chars > 14.5 → should be multi-line even with ratio < 1.
assert!(node_looks_multiline(&"x".repeat(16), &bounds, 0.5));
}
diff --git a/crates/screenpipe-connect/Cargo.toml b/crates/screenpipe-connect/Cargo.toml
index 7ad46fa8a..79a1ea768 100644
--- a/crates/screenpipe-connect/Cargo.toml
+++ b/crates/screenpipe-connect/Cargo.toml
@@ -7,6 +7,11 @@ repository = { workspace = true }
license = { workspace = true }
edition = { workspace = true }
+# libsqlite3-sys is pulled in for the `bundled` feature so workspace crates
+# link against the same C SQLite. Not directly imported here — silence machete.
+[package.metadata.cargo-machete]
+ignored = ["libsqlite3-sys"]
+
[dependencies]
image = { workspace = true }
reqwest = { workspace = true }
diff --git a/crates/screenpipe-connect/src/remote_sync.rs b/crates/screenpipe-connect/src/remote_sync.rs
index f69066b29..4e0e8856d 100644
--- a/crates/screenpipe-connect/src/remote_sync.rs
+++ b/crates/screenpipe-connect/src/remote_sync.rs
@@ -522,7 +522,10 @@ async fn sync_to_remote_inner(config: &SyncConfig, data_dir: &Path) -> Result<Sy
match snapshot_db(&db_path, &snap).await {
Ok(()) => {
- let bytes = tokio::fs::metadata(&snap).await.map(|m| m.len()).unwrap_or(0);
+ let bytes = tokio::fs::metadata(&snap)
+ .await
+ .map(|m| m.len())
+ .unwrap_or(0);
info!("db snapshot ready ({} bytes)", bytes);
Some(snap)
}
diff --git a/crates/screenpipe-db/tests/db.rs b/crates/screenpipe-db/tests/db.rs
index 0a91b40be..08469dcd1 100644
--- a/crates/screenpipe-db/tests/db.rs
+++ b/crates/screenpipe-db/tests/db.rs
@@ -82,6 +82,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -134,6 +135,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -158,6 +160,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -217,6 +220,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -241,6 +245,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -340,6 +345,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -364,6 +370,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -555,6 +562,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -582,6 +590,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -608,6 +617,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -638,6 +648,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -663,6 +674,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -792,6 +804,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -819,6 +832,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1278,6 +1292,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1308,6 +1323,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1338,6 +1354,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1364,6 +1381,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1441,6 +1459,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1465,6 +1484,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1489,6 +1509,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1581,6 +1602,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1679,6 +1701,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1704,6 +1727,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1752,6 +1776,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1793,6 +1818,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1828,6 +1854,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1863,6 +1890,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1903,6 +1931,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1948,6 +1977,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1989,6 +2019,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -2012,6 +2043,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
diff --git a/crates/screenpipe-db/tests/fts_dots_test.rs b/crates/screenpipe-db/tests/fts_dots_test.rs
index 3e6efaaed..3c91f4689 100644
--- a/crates/screenpipe-db/tests/fts_dots_test.rs
+++ b/crates/screenpipe-db/tests/fts_dots_test.rs
@@ -80,6 +80,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await;
@@ -140,6 +141,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await;
@@ -200,6 +202,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await;
@@ -262,6 +265,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await;
@@ -320,6 +324,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await;
@@ -479,6 +484,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await;
@@ -545,6 +551,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await;
@@ -613,6 +620,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await;
diff --git a/crates/screenpipe-db/tests/heavy_read_test.rs b/crates/screenpipe-db/tests/heavy_read_test.rs
index ff508283e..334f1892b 100644
--- a/crates/screenpipe-db/tests/heavy_read_test.rs
+++ b/crates/screenpipe-db/tests/heavy_read_test.rs
@@ -70,6 +70,7 @@ async fn test_concurrent_ocr_searches_dont_starve_pool() {
None,
None,
None,
+ None,
)
.await;
let elapsed = start.elapsed();
@@ -165,6 +166,7 @@ async fn test_search_completes_within_timeout() {
None,
None,
None,
+ None,
)
.await;
let elapsed = start.elapsed();
diff --git a/crates/screenpipe-db/tests/search_ocr_snapshot_test.rs b/crates/screenpipe-db/tests/search_ocr_snapshot_test.rs
index dd0cdd0d5..c319ef29a 100644
--- a/crates/screenpipe-db/tests/search_ocr_snapshot_test.rs
+++ b/crates/screenpipe-db/tests/search_ocr_snapshot_test.rs
@@ -80,6 +80,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -160,6 +161,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -185,6 +187,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -210,6 +213,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -305,6 +309,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -407,6 +412,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -439,6 +445,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();