Unverified Commit bfbbf260 authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

fix instances of write_all without flush (#1001)



* fix instances of write_all without flush

* fix errors

* Update byte_stream.rs

Co-authored-by: default avatarZelda Hessler <zhessler@amazon.com>
parent e9bd850d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ fn generate_build_vars(output_path: &Path) {
        .expect("Could not create build environment");
    f.write_all(format!("const RUST_VERSION: &str = \"{}\";", rust_version).as_bytes())
        .expect("Unable to write rust version");
    f.flush().expect("failed to flush");
}

fn main() {
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ async fn main() -> Result<(), Error> {

    let mut ofile = File::create(&out_file).expect("unable to create file");
    ofile.write_all(s.as_bytes()).expect("unable to write");
    ofile.flush().expect("failed to flush");

    if verbose {
        println!("Wrote the following to {:?}", out_file);
+1 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ async fn main() -> Result<(), Error> {

    let mut ofile = File::create(o).expect("unable to create file");
    ofile.write_all(s.as_bytes()).expect("unable to write");
    ofile.flush().expect("failed to flush");

    if verbose {
        println!("Wrote the following to {}:", output_file);