fn shrink(&self) -> Box<dyn Iterator<Item = Self>> {
            use Syntax::*;
            let span = self.span;
            let v = match &self.inner {
                Recv(_) | Send(_) | Type(_) | Break(None) | Continue(None) => vec![],
                Call(callee) => callee.shrink().map(Call).collect(),
                Split { tx_only, rx_only } => tx_only
                    .shrink()
                    .flat_map(|tx_shrunk| {
                        rx_only.shrink().map(move |rx_shrunk| Split {
                            tx_only: tx_shrunk.clone(),
                            rx_only: rx_shrunk,
                        })
                    })
                    .collect(),
                Choose(choices) => choices.shrink().map(Choose).collect(),
                Offer(choices) => choices.shrink().map(Offer).collect(),
                Loop(label, body) => body
                    .shrink()
                    .map(|body_shrunk| Loop(label.clone(), body_shrunk))
                    .chain(label.as_ref().map(|_| Loop(None, body.clone())))
                    .collect(),
                Block(stmts) => stmts.shrink().map(Block).collect(),
                Break(Some(_)) => vec![Break(None)],
                Continue(Some(_)) => vec![Continue(None)],
            };

            Box::new(v.into_iter().map(move |inner| Spanned { inner, span }))
        }
// We need to be careful here not to shrink the labels because shrinking a string can result
// in the empty string, which will panic when we try to construct a syn `Lifetime` from it.
We need to be careful here not to shrink the labels because shrinking a string can result
in the empty string, which will panic when we try to construct a syn `Lifetime` from it.
We need to be careful here not to shrink the labels because shrinking a string can result in the empty string which will panic when we try to construct a syn ` Lifetime ` from it .
fn shrink(&self) -> Box<dyn Iterator<Item = Self>> {
            use Syntax::*;
            let span = self.span;
            let v = match &self.inner {
                Recv(_) | Send(_) | Type(_) | Break(None) | Continue(None) => vec![],
                Call(callee) => callee.shrink().map(Call).collect(),
                Split { tx_only, rx_only } => tx_only
                    .shrink()
                    .flat_map(|tx_shrunk| {
                        rx_only.shrink().map(move |rx_shrunk| Split {
                            tx_only: tx_shrunk.clone(),
                            rx_only: rx_shrunk,
                        })
                    })
                    .collect(),
                Choose(choices) => choices.shrink().map(Choose).collect(),
                Offer(choices) => choices.shrink().map(Offer).collect(),
                Loop(label, body) => body
                    .shrink()
                    .map(|body_shrunk| Loop(label.clone(), body_shrunk))
                    .chain(label.as_ref().map(|_| Loop(None, body.clone())))
                    .collect(),
                Block(stmts) => stmts.shrink().map(Block).collect(),
                Break(Some(_)) => vec![Break(None)],
                Continue(Some(_)) => vec![Continue(None)],
            };
            Box::new(v.into_iter().map(move |inner| Spanned { inner, span }))
        }
fn shrink ( & self ) -> Box < dyn Iterator < Item = Self > > { use Syntax :: * ; let span = self . span ; let v = match & self . inner { Recv ( _ ) | Send ( _ ) | Type ( _ ) | Break ( None ) | Continue ( None ) => vec ! [ ] , Call ( callee ) => callee . shrink ( ) . map ( Call ) . collect ( ) , Split { tx_only , rx_only } => tx_only . shrink ( ) . flat_map ( | tx_shrunk | { rx_only . shrink ( ) . map ( move | rx_shrunk | Split { tx_only : tx_shrunk . clone ( ) , rx_only : rx_shrunk , } ) } ) . collect ( ) , Choose ( choices ) => choices . shrink ( ) . map ( Choose ) . collect ( ) , Offer ( choices ) => choices . shrink ( ) . map ( Offer ) . collect ( ) , Loop ( label , body ) => body . shrink ( ) . map ( | body_shrunk | Loop ( label . clone ( ) , body_shrunk ) ) . chain ( label . as_ref ( ) . map ( | _ | Loop ( None , body . clone ( ) ) ) ) . collect ( ) , Block ( stmts ) => stmts . shrink ( ) . map ( Block ) . collect ( ) , Break ( Some ( _ ) ) => vec ! [ Break ( None ) ] , Continue ( Some ( _ ) ) => vec ! [ Continue ( None ) ] , } ; Box :: new ( v . into_iter ( ) . map ( move | inner | Spanned { inner , span } ) ) }
We need to be careful here not to shrink the labels because shrinking a string can result
in the empty string, which will panic when we try to construct a syn `Lifetime` from it.
We need to be careful here not to shrink the labels because shrinking a string can result in the empty string which will panic when we try to construct a syn ` Lifetime ` from it .
&self