fn make_system_image_package(static_index: String) -> (Vec<u8>, Vec<Vec<u8>>) {
        let tmp = tempfile::tempdir().unwrap();
        std::fs::write(tmp.path().join("static_index"), static_index.as_bytes()).unwrap();

        let mut meta_far = vec![];
        fuchsia_pkg::build(
            &CreationManifest::from_external_and_far_contents(
                btreemap! {
                    "data/static_packages".to_string() =>
                        tmp.path().join("static_index").into_os_string().into_string().unwrap(),
                },
                btreemap! {},
            )
            .unwrap(),
            &MetaPackage::from_name_and_variant("system_image", "0").unwrap(),
            &mut meta_far,
        )
        .unwrap();

        (meta_far, vec![static_index.into_bytes()])
    }
/// Makes a test system_image package containing the given literal static_index contents,
/// producing a tuple of the meta far bytes and a vec of content blob bytes.
Makes a test system_image package containing the given literal static_index contents,
producing a tuple of the meta far bytes and a vec of content blob bytes.
Makes a test system_image package containing the given literal static_index contents producing a tuple of the meta far bytes and a vec of content blob bytes .
fn make_system_image_package(static_index: String) -> (Vec<u8>, Vec<Vec<u8>>) {
        let tmp = tempfile::tempdir().unwrap();
        std::fs::write(tmp.path().join("static_index"), static_index.as_bytes()).unwrap();
        let mut meta_far = vec![];
        fuchsia_pkg::build(
            &CreationManifest::from_external_and_far_contents(
                btreemap! {
                    "data/static_packages".to_string() =>
                        tmp.path().join("static_index").into_os_string().into_string().unwrap(),
                },
                btreemap! {},
            )
            .unwrap(),
            &MetaPackage::from_name_and_variant("system_image", "0").unwrap(),
            &mut meta_far,
        )
        .unwrap();
        (meta_far, vec![static_index.into_bytes()])
    }
fn make_system_image_package ( static_index : String ) -> ( Vec < u8 > , Vec < Vec < u8 > > ) { let tmp = tempfile :: tempdir ( ) . unwrap ( ) ; std :: fs :: write ( tmp . path ( ) . join ( " " ) , static_index . as_bytes ( ) ) . unwrap ( ) ; let mut meta_far = vec ! [ ] ; fuchsia_pkg :: build ( & CreationManifest :: from_external_and_far_contents ( btreemap ! { " " to_string ( ) tmp path ( ) join ( " " ) into_os_string ( ) into_string ( ) unwrap ( ) } , btreemap ! { } , ) . unwrap ( ) , & MetaPackage :: from_name_and_variant ( " " , " " ) . unwrap ( ) , & mut meta_far , ) . unwrap ( ) ; ( meta_far , vec ! [ static_index into_bytes ( ) ] ) }
Makes a test system_image package containing the given literal static_index contents,
producing a tuple of the meta far bytes and a vec of content blob bytes.
Makes a test system_image package containing the given literal static_index contents producing a tuple of the meta far bytes and a vec of content blob bytes .
static_index
String