fn clone(&self) -> Self {
            // We assume that:
            //
            // let x = A::arbitrary(gen);
            // let s1 = x.clone().shrink();
            // let s2 = x.shrink();
            // assert_eq(s1.collect::<Vec<A>>(), s2.collect::<Vec<A>>());
            //
            // always holds. In other words, that shrinking is deterministic.
            // We also assume that:
            //
            // A::arbitrary(gen);
            // let s = x.shrink();
            // let y = x.next()?;
            // assert_eq!(x.next(), y.shrink().next());
            //
            // always holds.
            //
            // It may not actually hold for all A, but we don't care, as we only
            // provide Clone for testing purposes and we pick A = u32 for which
            // it always holds.
            QCValueTree {
                prev: self.prev.clone(),
                curr: self.curr.clone(),
                shrinker: self.curr.shrink()
            }
        }
/// Only implemented so that the implementation can be tested.
/// As to why this is not a public API, read the note below.
Only implemented so that the implementation can be tested.
As to why this is not a public API, read the note below.
Only implemented so that the implementation can be tested . As to why this is not a public API read the note below .
fn clone(&self) -> Self {
            // We assume that:
            //
            // let x = A::arbitrary(gen);
            // let s1 = x.clone().shrink();
            // let s2 = x.shrink();
            // assert_eq(s1.collect::<Vec<A>>(), s2.collect::<Vec<A>>());
            //
            // always holds. In other words, that shrinking is deterministic.
            // We also assume that:
            //
            // A::arbitrary(gen);
            // let s = x.shrink();
            // let y = x.next()?;
            // assert_eq!(x.next(), y.shrink().next());
            //
            // always holds.
            //
            // It may not actually hold for all A, but we don't care, as we only
            // provide Clone for testing purposes and we pick A = u32 for which
            // it always holds.
            QCValueTree {
                prev: self.prev.clone(),
                curr: self.curr.clone(),
                shrinker: self.curr.shrink()
            }
        }
fn clone ( & self ) -> Self { // We assume that: // // let x = A::arbitrary(gen); // let s1 = x.clone().shrink(); // let s2 = x.shrink(); // assert_eq(s1.collect::<Vec<A>>(), s2.collect::<Vec<A>>()); // // always holds. In other words, that shrinking is deterministic. // We also assume that: // // A::arbitrary(gen); // let s = x.shrink(); // let y = x.next()?; // assert_eq!(x.next(), y.shrink().next()); // // always holds. // // It may not actually hold for all A, but we don't care, as we only // provide Clone for testing purposes and we pick A = u32 for which // it always holds. QCValueTree { prev : self . prev . clone ( ) , curr : self . curr . clone ( ) , shrinker : self . curr . shrink ( ) } }
Only implemented so that the implementation can be tested.
Only implemented so that the implementation can be tested .
&self
&self