Use fs_err with AutoStream (#648)

This commit is contained in:
Charlie Marsh 2023-12-13 23:56:55 -05:00 committed by GitHub
parent db7e2dedbb
commit 402b728bf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,7 +192,9 @@ pub(crate) async fn pip_compile(
// Write the resolved dependencies to the output channel.
let mut writer: Box<dyn std::io::Write> = if let Some(output_file) = output_file {
Box::new(AutoStream::auto(std::fs::File::create(output_file)?))
Box::new(AutoStream::<std::fs::File>::auto(
fs::File::create(output_file)?.into(),
))
} else {
Box::new(AutoStream::auto(stdout()))
};