From a9548980f3e2bd6a9b70dcad7254982936df4284 Mon Sep 17 00:00:00 2001 From: Michael Macias Date: Thu, 29 Aug 2024 18:42:50 -0500 Subject: [PATCH] util/alignment/async/io/writer: Shut down SAM writer --- noodles-util/src/alignment/async/io/writer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, }