diff --git a/noodles-util/src/alignment/async/io/writer.rs b/noodles-util/src/alignment/async/io/writer.rs index 0e5b8b8d0..fc889e19e 100644 --- a/noodles-util/src/alignment/async/io/writer.rs +++ b/noodles-util/src/alignment/async/io/writer.rs @@ -5,7 +5,7 @@ mod builder; use noodles_bam as bam; use noodles_cram as cram; use noodles_sam as sam; -use tokio::io::{self, AsyncWrite}; +use tokio::io::{self, AsyncWrite, AsyncWriteExt}; pub use self::builder::Builder; @@ -102,7 +102,7 @@ where /// ``` pub async fn shutdown(&mut self, header: &sam::Header) -> io::Result<()> { match self { - Self::Sam(_) => Ok(()), + Self::Sam(writer) => writer.get_mut().shutdown().await, Self::Bam(writer) => writer.shutdown().await, Self::Cram(writer) => writer.shutdown(header).await, }