Skip to content

Commit

Permalink
util/alignment/async/io/writer: Shut down SAM writer
Browse files Browse the repository at this point in the history
  • Loading branch information
zaeleus committed Aug 29, 2024
1 parent 5545bc3 commit a954898
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions noodles-util/src/alignment/async/io/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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,
}
Expand Down

0 comments on commit a954898

Please sign in to comment.