Use write_all when not writing partially

This commit is contained in:
Sudarsan Balaji 2022-04-04 10:59:19 +01:00
parent a5bd16db4d
commit 7ea5e75bc4
No known key found for this signature in database
GPG Key ID: 6644FFAC82AC1970

View File

@ -2,7 +2,6 @@ use std::fmt;
use std::path::PathBuf; use std::path::PathBuf;
use std::str::FromStr; use std::str::FromStr;
use structopt::StructOpt; use structopt::StructOpt;
use uniffi_bindgen;
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub enum Language { pub enum Language {
@ -89,7 +88,7 @@ def _loadIndirectOld():"#,
.write(true) .write(true)
.truncate(true) .truncate(true)
.open(&bindings_file)?; .open(&bindings_file)?;
file.write(data.as_bytes())?; file.write_all(data.as_bytes())?;
Ok(()) Ok(())
} }