pub fn install_local_cargo_generate(&self) -> PathBuf {
        static INSTALL_CARGO_GENERATE: Once = Once::new();
        let cache = self.cache();

        let download = || {
            if let Ok(download) =
                install::download_prebuilt(&Tool::CargoGenerate, &cache, "latest", true)
            {
                return Ok(download);
            }

            install::cargo_install(Tool::CargoGenerate, &cache, "latest", true)
        };

        // Only one thread can perform the actual download, and then afterwards
        // everything will hit the cache so we can run the same path.
        INSTALL_CARGO_GENERATE.call_once(|| {
            download().unwrap();
        });
        if let install::Status::Found(dl) = download().unwrap() {
            dl.binary("cargo-generate").unwrap()
        } else {
            panic!("Download failed")
        }
    }
/// Install a local cargo-generate for this fixture.
///
/// Takes care not to re-install for every fixture, but only the one time
/// for the whole test suite.
Install a local cargo-generate for this fixture.
Takes care not to re-install for every fixture, but only the one time
for the whole test suite.
Install a local cargo - generate for this fixture . Takes care not to re - install for every fixture but only the one time for the whole test suite .
pub fn install_local_cargo_generate(&self) -> PathBuf {
        static INSTALL_CARGO_GENERATE: Once = Once::new();
        let cache = self.cache();
        let download = || {
            if let Ok(download) =
                install::download_prebuilt(&Tool::CargoGenerate, &cache, "latest", true)
            {
                return Ok(download);
            }
            install::cargo_install(Tool::CargoGenerate, &cache, "latest", true)
        };
        // Only one thread can perform the actual download, and then afterwards
        // everything will hit the cache so we can run the same path.
        INSTALL_CARGO_GENERATE.call_once(|| {
            download().unwrap();
        });
        if let install::Status::Found(dl) = download().unwrap() {
            dl.binary("cargo-generate").unwrap()
        } else {
            panic!("Download failed")
        }
    }
pub fn install_local_cargo_generate ( & self ) -> PathBuf { static INSTALL_CARGO_GENERATE : Once = Once :: new ( ) ; let cache = self . cache ( ) ; let download = | | { if let Ok ( download ) = install :: download_prebuilt ( & Tool :: CargoGenerate , & cache , " " , true ) { return Ok ( download ) ; } install :: cargo_install ( Tool :: CargoGenerate , & cache , " " , true ) } ; // Only one thread can perform the actual download, and then afterwards // everything will hit the cache so we can run the same path. INSTALL_CARGO_GENERATE . call_once ( | | { download ( ) . unwrap ( ) ; } ) ; if let install :: Status :: Found ( dl ) = download ( ) . unwrap ( ) { dl . binary ( " " ) . unwrap ( ) } else { panic ! ( " " ) } }
Install a local cargo-generate for this fixture.
Install a local cargo - generate for this fixture .
&self