chore: rustfmt the workspace and make clippy -D warnings pass
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,7 +54,10 @@ impl DemoOrbit {
|
||||
}
|
||||
|
||||
fn demo_id(kind: &str, name: &str) -> Uuid {
|
||||
Uuid::new_v5(&Uuid::NAMESPACE_OID, format!("{DEMO_NS}:{kind}:{name}").as_bytes())
|
||||
Uuid::new_v5(
|
||||
&Uuid::NAMESPACE_OID,
|
||||
format!("{DEMO_NS}:{kind}:{name}").as_bytes(),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn apply(data_dir: &Path, vault_pass: &str, force: bool) -> Result<SeedReport> {
|
||||
@@ -161,10 +164,7 @@ pub fn clear_demo(data_dir: &Path, vault_pass: &str) -> Result<()> {
|
||||
let id = demo_id("orbit", o.slug).to_string();
|
||||
conn.execute("DELETE FROM orbits WHERE id = ?1", params![id])?;
|
||||
}
|
||||
conn.execute(
|
||||
"DELETE FROM outposts WHERE id LIKE 'demo-%'",
|
||||
[],
|
||||
)?;
|
||||
conn.execute("DELETE FROM outposts WHERE id LIKE 'demo-%'", [])?;
|
||||
}
|
||||
let vault_path = data_dir.join("vault");
|
||||
if vault_path.join("config").exists() {
|
||||
@@ -416,7 +416,12 @@ mod tests {
|
||||
assert!(orbit.snapshot_age(0) > Duration::zero());
|
||||
for index in 1..orbit.snap_count {
|
||||
let gap = orbit.snapshot_age(index) - orbit.snapshot_age(index - 1);
|
||||
assert!((gap - Duration::hours(orbit.interval_hours)).num_minutes().abs() < 45);
|
||||
assert!(
|
||||
(gap - Duration::hours(orbit.interval_hours))
|
||||
.num_minutes()
|
||||
.abs()
|
||||
< 45
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user