flush write_all

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
This commit is contained in:
Anton-4 2024-08-20 12:36:15 +02:00 committed by GitHub
parent 7c7485bb04
commit 8f9d4149ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,6 +93,11 @@ pub extern "C" fn rust_main() -> i32 {
panic!("Writing to stdout failed! {:?}", e);
}
// roc_str will not print without flushing if it does not contain a newline and you're using --linker=legacy
if let Err(e) = std::io::stdout().flush() {
panic!("Failed to flush stdout: {:?}", e);
}
// Exit code
0
}