style(zset): satisfy clippy and the comment cap (improvise-bw4p.1)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
committed by
Edward Langley
parent
a4dadae366
commit
ba17f92bc9
@@ -324,9 +324,8 @@ impl<K: Ord> Rebuild<K> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Runs chunks until the snapshot is consumed or `expired()` says stop. It always
|
||||
/// runs at least one chunk when any remain, so each call makes progress. `expired`
|
||||
/// is a predicate, not an `Instant`: `Instant::now()` panics on wasm32.
|
||||
/// Runs chunks until done or `expired()`, at least one per call. A predicate, not an
|
||||
/// `Instant`, which panics on wasm32 (`context/code/zset.md`).
|
||||
pub fn step(&mut self, circuit: &mut Circuit, mut expired: impl FnMut() -> bool) -> Progress {
|
||||
loop {
|
||||
let chunk: ZSet<K> = self.rest.by_ref().take(self.chunk).collect();
|
||||
|
||||
@@ -193,7 +193,7 @@ proptest! {
|
||||
prop_assert_eq!(join_ref(&(&a1 + &a2), &b1), &join_ref(&a1, &b1) + &join_ref(&a2, &b1), "[bilinear-left]");
|
||||
prop_assert_eq!(join_ref(&a1, &(&b1 + &b2)), &join_ref(&a1, &b1) + &join_ref(&a1, &b2), "[bilinear-right]");
|
||||
// and the circuit's output is bilinear too: one step of a+a' equals two of a, a'.
|
||||
let once = join_circuit(&[&a1 + &a2], &[b1.clone()]);
|
||||
let once = join_circuit(&[&a1 + &a2], std::slice::from_ref(&b1));
|
||||
let twice = join_circuit(&[a1.clone(), a2.clone()], &[b1.clone(), Z::new()]);
|
||||
let sum_once = once.into_iter().fold(Z::new(), |x, d| x + d);
|
||||
let sum_twice = twice.into_iter().fold(Z::new(), |x, d| x + d);
|
||||
|
||||
Reference in New Issue
Block a user