From 25d99aa993f120c8f6796ea2d91f15c3c26b8201 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 23:12:13 +0000 Subject: access: what a generated change picks from, given its type The closed paths a generated write picks one of are an array of their own, and the events a node put a slice: picked from an array written in place, a path's type is left to be inferred from where it goes, which some compilers don't. --- src/access/holding.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/access/holding.rs') diff --git a/src/access/holding.rs b/src/access/holding.rs index 2d083ba..3820e79 100644 --- a/src/access/holding.rs +++ b/src/access/holding.rs @@ -374,7 +374,7 @@ mod tests { ); bytes }; - let some = rng.pick(written).clone(); + let some = rng.pick(written.as_slice()).clone(); let key = Id::of(&some).to_string(); let entry = |node: &str| meta::path(&[meta::MEMBERS, node]); match rng.below(10) { @@ -390,15 +390,14 @@ mod tests { 6 => store::delete_path(doc, &meta::path(&[meta::EVENTS, &key]), false)?, 7 => store::write_path(doc, &entry(node), &json!({"alias": node}))?, 8 => store::write_path(doc, &entry("node-elsewhere"), &json!({}))?, - _ => store::write_path( - doc, - rng.pick(&[ + _ => { + let closed: [Vec; 3] = [ vec!["config".to_owned()], meta::path(&[meta::SWARM]), crate::access::policy::path(), - ]), - &json!(1), - )?, + ]; + store::write_path(doc, rng.pick(&closed), &json!(1))? + } } } Ok(()) -- cgit v1.3.1