mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-06 14:03:16 -05:00
Scripts: name the partitioned segment sets' type so clippy 1.100 passes
Clippy 1.100's type_complexity lint rejects the two-set tuple annotation in the segment partition of crates/engine/src/script/dom.rs, which stopped the CI gate at its clippy step. The set type now goes on the partition call.
This commit is contained in:
1 parent
1e7af19904
commit
020cc1333a
1 file changed
+2
-2
@@ -983,8 +983,8 @@ fn on_doc_steps<T>(
|
||||
let len =
|
||||
|p: usize| old.node(id).and_then(|n| n.path_data()).and_then(|pd| pd.subpaths.get(p)).map_or(1, |sp| sp.anchors.len().max(1));
|
||||
let ends = |&(p, k): &(usize, usize)| [(p, k), (p, (k + 1) % len(p))];
|
||||
let (left, gone): (BTreeSet<(usize, usize)>, BTreeSet<(usize, usize)>) =
|
||||
before.segments.remove(&id).into_iter().flatten().partition(|s| segment_left(s));
|
||||
let (left, gone) =
|
||||
before.segments.remove(&id).into_iter().flatten().partition::<BTreeSet<(usize, usize)>, _>(|s| segment_left(s));
|
||||
// The anchors that only ended removed segments are dropped; the ends of the
|
||||
// segments that are left stay selected.
|
||||
let still: HashSet<(usize, usize)> = left.iter().flat_map(ends).collect();
|
||||
|
||||
Reference in new issue
Block a user