Skip to content

Commit

Permalink
vcf/async/io/reader/header: Pin inner reader in projection
Browse files Browse the repository at this point in the history
  • Loading branch information
zaeleus committed Dec 19, 2024
1 parent a8f8e72 commit 72d8728
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion noodles-vcf/src/async/io/reader/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pin_project! {
///
/// This is created by calling [`super::Reader::header_reader`].
pub struct Reader<R> {
#[pin]
inner: R,
is_eol: bool,
}
Expand Down Expand Up @@ -64,7 +65,7 @@ where
const LINE_FEED: u8 = b'\n';

let this = self.project();
let buf = ready!(Pin::new(this.inner).poll_fill_buf(cx))?;
let buf = ready!(this.inner.poll_fill_buf(cx))?;

let buf = if *this.is_eol && buf.first().map(|&b| b != PREFIX).unwrap_or(true) {
&[]
Expand Down

0 comments on commit 72d8728

Please sign in to comment.