@@ -254,7 +254,7 @@ impl<Msg> Drop for World<Msg> {
254254fn run_test < Msg : Debug + PartialEq + Clone , F : Fn ( ) -> NodeHandle < Msg > > (
255255 number_of_nodes : u8 ,
256256 spawn : F ,
257- property : impl Fn ( History < Msg > ) -> Result < ( ) , String > ,
257+ property : impl Fn ( & History < Msg > ) -> Result < ( ) , String > ,
258258) -> impl Fn ( & [ Reverse < Entry < Msg > > ] ) -> ( History < Msg > , Result < ( ) , String > ) {
259259 move |entries| {
260260 let node_handles: Vec < _ > = ( 1 ..=number_of_nodes)
@@ -266,7 +266,7 @@ fn run_test<Msg: Debug + PartialEq + Clone, F: Fn() -> NodeHandle<Msg>>(
266266 match world. run_world ( ) {
267267 Ok ( history) => {
268268 let history = History ( history. to_vec ( ) ) ;
269- let result = property ( history. clone ( ) ) ;
269+ let result = property ( & history) ;
270270 ( history, result)
271271 }
272272 Err ( ( reason, history) ) => ( History ( history. to_vec ( ) ) , Err ( reason) ) ,
@@ -278,7 +278,7 @@ pub fn simulate<Msg, F>(
278278 config : SimulateConfig ,
279279 spawn : F ,
280280 generator : impl Fn ( & mut StdRng ) -> Vec < Reverse < Entry < Msg > > > ,
281- property : impl Fn ( History < Msg > ) -> Result < ( ) , String > ,
281+ property : impl Fn ( & History < Msg > ) -> Result < ( ) , String > ,
282282 trace_buffer : Arc < parking_lot:: Mutex < TraceBuffer > > ,
283283 persist_on_success : bool ,
284284) where
@@ -525,7 +525,7 @@ mod tests {
525525 } ;
526526
527527 // TODO: Take response time into account.
528- const ECHO_PROPERTY : fn ( History < EchoMessage > ) -> Result < ( ) , String > = |history : History <
528+ const ECHO_PROPERTY : fn ( & History < EchoMessage > ) -> Result < ( ) , String > = |history : & History <
529529 EchoMessage ,
530530 > | {
531531 for ( index, msg) in history
0 commit comments