async fn delete_local(pathbuf: &PathBuf) -> Result<()> {
    // File transfered.  Now delete it locally.
    match std::fs::remove_file(pathbuf) {
        Ok(_) => {
            debug!("Successfully deleted file: {:?}", pathbuf);
            Ok(())
        }
        Err(_) => {
            error!("Failed to delete file: {:?}", pathbuf);
            let path = pathbuf
                .to_str()
                .expect("unable to convert pathbuf to string")
                .to_owned();
            bail!(S3Error::DeleteFile(path))
        }
    }
}
// delete a local file at @pathbuf.
delete a local file at @pathbuf.
delete a local file at @pathbuf .
async fn delete_local(pathbuf: &PathBuf) -> Result<()> {
    // File transfered.  Now delete it locally.
    match std::fs::remove_file(pathbuf) {
        Ok(_) => {
            debug!("Successfully deleted file: {:?}", pathbuf);
            Ok(())
        }
        Err(_) => {
            error!("Failed to delete file: {:?}", pathbuf);
            let path = pathbuf
                .to_str()
                .expect("unable to convert pathbuf to string")
                .to_owned();
            bail!(S3Error::DeleteFile(path))
        }
    }
}
async fn delete_local ( pathbuf : & PathBuf ) -> Result < ( ) > { // File transfered.  Now delete it locally. match std :: fs :: remove_file ( pathbuf ) { Ok ( _ ) => { debug ! ( " " pathbuf ) ; Ok ( ( ) ) } Err ( _ ) => { error ! ( " " pathbuf ) ; let path = pathbuf . to_str ( ) . expect ( " " ) . to_owned ( ) ; bail ! ( S3Error DeleteFile ( path ) ) } } }
delete a local file at @pathbuf.
delete a local file at @pathbuf .
pathbuf
&PathBuf
pathbuf
&PathBuf