fn make_ongoing_events(
            rng: &mut TestRng,
            duplicate_count: usize,
            initial_events: &[ServerSentEvent],
            path_filter: &str,
            deploys: &mut HashMap<DeployHash, Deploy>,
        ) -> Vec<ServerSentEvent> {
            assert!(duplicate_count < initial_events.len());
            let initial_skip_count = initial_events.len() - duplicate_count;
            let unique_start_id = initial_events.len() as Id - 1;
            let unique_count = NUM_ONGOING_EVENTS - duplicate_count;
            initial_events
                .iter()
                .skip(initial_skip_count)
                .cloned()
                .chain(make_random_events(
                    rng,
                    unique_start_id,
                    unique_count,
                    path_filter,
                    deploys,
                ))
                .collect()
        }
// Returns `NUM_ONGOING_EVENTS` random SSE events for the ongoing stream containing
// duplicates taken from the end of the initial stream.  Allows for the full initial stream
// to be duplicated except for its first event (the `ApiVersion` one) which has no ID.
Returns `NUM_ONGOING_EVENTS` random SSE events for the ongoing stream containing
duplicates taken from the end of the initial stream.  Allows for the full initial stream
to be duplicated except for its first event (the `ApiVersion` one) which has no ID.
Returns ` NUM_ONGOING_EVENTS ` random SSE events for the ongoing stream containing duplicates taken from the end of the initial stream . Allows for the full initial stream to be duplicated except for its first event ( the ` ApiVersion ` one ) which has no ID .
fn make_ongoing_events(
            rng: &mut TestRng,
            duplicate_count: usize,
            initial_events: &[ServerSentEvent],
            path_filter: &str,
            deploys: &mut HashMap<DeployHash, Deploy>,
        ) -> Vec<ServerSentEvent> {
            assert!(duplicate_count < initial_events.len());
            let initial_skip_count = initial_events.len() - duplicate_count;
            let unique_start_id = initial_events.len() as Id - 1;
            let unique_count = NUM_ONGOING_EVENTS - duplicate_count;
            initial_events
                .iter()
                .skip(initial_skip_count)
                .cloned()
                .chain(make_random_events(
                    rng,
                    unique_start_id,
                    unique_count,
                    path_filter,
                    deploys,
                ))
                .collect()
        }
fn make_ongoing_events ( rng : & mut TestRng , duplicate_count : usize , initial_events : & [ ServerSentEvent ] , path_filter : & str , deploys : & mut HashMap < DeployHash , Deploy > , ) -> Vec < ServerSentEvent > { assert ! ( duplicate_count initial_events len ( ) ) ; let initial_skip_count = initial_events . len ( ) - duplicate_count ; let unique_start_id = initial_events . len ( ) as Id - 1 ; let unique_count = NUM_ONGOING_EVENTS - duplicate_count ; initial_events . iter ( ) . skip ( initial_skip_count ) . cloned ( ) . chain ( make_random_events ( rng , unique_start_id , unique_count , path_filter , deploys , ) ) . collect ( ) }
Returns `NUM_ONGOING_EVENTS` random SSE events for the ongoing stream containing
duplicates taken from the end of the initial stream.
Returns ` NUM_ONGOING_EVENTS ` random SSE events for the ongoing stream containing duplicates taken from the end of the initial stream .
rng
&mut TestRng
duplicate_count
usize
initial_events
&[ServerSentEvent]
path_filter
&str
deploys
&mut HashMap<DeployHash, Deploy>
rng
&mut TestRng
duplicate_count
usize
initial_events
&[ServerSentEvent]
path_filter
&str
deploys
&mut HashMap<DeployHash, Deploy>