rustdoc: Use write_all to ensure all content is written

This commit is contained in:
Noah Lev 2024-05-30 22:10:14 -07:00 committed by Guillaume Gomez
parent 3ee4629446
commit f9e12ef946

View File

@ -80,7 +80,7 @@ pub(crate) fn generate_args_file(file_path: &Path, options: &RustdocOptions) ->
let content = content.join("\n"); let content = content.join("\n");
file.write(content.as_bytes()) file.write_all(content.as_bytes())
.map_err(|error| format!("failed to write arguments to temporary file: {error:?}"))?; .map_err(|error| format!("failed to write arguments to temporary file: {error:?}"))?;
Ok(()) Ok(())
} }