fn create_output_files() -> Result<Option<(PathBuf, PathBuf)>> {
    let home = get_wrangler_home_dir().join("config");
    let cert = home.join("dev-cert.pem");
    let privkey = home.join("dev-privkey.rsa");

    if cert.exists() && privkey.exists() {
        Ok(None)
    } else {
        fs::create_dir_all(&home)?;

        StdOut::info(format!("Generating certificate and private key for https server, if you would like to use your own you can replace `dev-cert.pem` and `dev-privkey.rsa` at {}", home.to_str().unwrap()).as_str());

        Ok(Some((cert, privkey)))
    }
}
/// Create files for cert and private key
Create files for cert and private key
Create files for cert and private key
fn create_output_files() -> Result<Option<(PathBuf, PathBuf)>> {
    let home = get_wrangler_home_dir().join("config");
    let cert = home.join("dev-cert.pem");
    let privkey = home.join("dev-privkey.rsa");
    if cert.exists() && privkey.exists() {
        Ok(None)
    } else {
        fs::create_dir_all(&home)?;
        StdOut::info(format!("Generating certificate and private key for https server, if you would like to use your own you can replace `dev-cert.pem` and `dev-privkey.rsa` at {}", home.to_str().unwrap()).as_str());
        Ok(Some((cert, privkey)))
    }
}
fn create_output_files ( ) -> Result < Option < ( PathBuf , PathBuf ) > > { let home = get_wrangler_home_dir ( ) . join ( " " ) ; let cert = home . join ( " " ) ; let privkey = home . join ( " " ) ; if cert . exists ( ) && privkey . exists ( ) { Ok ( None ) } else { fs :: create_dir_all ( & home ) ? ; StdOut :: info ( format ! ( " " home to_str ( ) unwrap ( ) ) . as_str ( ) ) ; Ok ( Some ( ( cert , privkey ) ) ) } }
Create files for cert and private key
Create files for cert and private key