/// Creates a fake DownloadState::Loading.
/// We only use download states for comparison in tests, so it doesn't matter
/// if the contents make sense.
Creates a fake DownloadState::Loading.
We only use download states for comparison in tests, so it doesn't matter
if the contents make sense.
Creates a fake DownloadState :: Loading . We only use download states for comparison in tests so it doesn ' t matter if the contents make sense .
fn fake_loading(seed: u32) -> (DownloadState, Manifest, HashSet<usize>) {
    let manifest = Manifest {
        version: seed,
        file_table: vec![],
        chunk_table: vec![],
    };
    let fetch_chunks: HashSet<usize> = maplit::hashset! { (seed + 1) as usize };
    let state = DownloadState::Loading {
        manifest: manifest.clone(),
        fetch_chunks: fetch_chunks.clone(),
    };
    (state, manifest, fetch_chunks)
}
fn fake_loading ( seed : u32 ) -> ( DownloadState , Manifest , HashSet < usize > ) { let manifest = Manifest { version : seed , file_table : vec ! [ ] , chunk_table : vec ! [ ] , } ; let fetch_chunks : HashSet < usize > = maplit :: hashset ! { ( seed 1 ) as usize } ; let state = DownloadState :: Loading { manifest : manifest . clone ( ) , fetch_chunks : fetch_chunks . clone ( ) , } ; ( state , manifest , fetch_chunks ) }
Creates a fake DownloadState::Loading.
Creates a fake DownloadState :: Loading .
seed
u32