Skip to content

Commit

Permalink
fasta/fai/async: Move reader to io module
Browse files Browse the repository at this point in the history
  • Loading branch information
zaeleus committed Sep 23, 2024
1 parent 44d7685 commit e4116cb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
6 changes: 6 additions & 0 deletions noodles-fasta/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@

* fasta/fai: Move reader (`Reader`) and writer (`Writer`) to `io` module.

* fasta/fai/async: Move reader (`Reader`) to `io` module.

### Deprecated

* fasta/fai: Deprecate `Reader` and `Writer`.

Use `fai::io::Reader` and `fai::io::Writer`, respectively, instead.

* fasta/fai/async: Deprecate `Reader` and `Writer`.

Use `fai::r#async::io::Reader` instead.

## 0.43.0 - 2024-09-04

### Changed
Expand Down
5 changes: 3 additions & 2 deletions noodles-fasta/src/fai.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! FASTA index (FAI) and fields.

#[cfg(feature = "async")]
mod r#async;
pub mod r#async;

mod index;
pub mod io;
Expand All @@ -16,7 +16,8 @@ pub use self::io::Reader;
pub use self::io::Writer;

#[cfg(feature = "async")]
pub use self::r#async::Reader as AsyncReader;
#[deprecated(since = "0.44.0", note = "Use `fai::r#async::io::Reader` instead.")]
pub use self::r#async::io::Reader as AsyncReader;

use std::{fs::File, io::BufReader, path::Path};

Expand Down
4 changes: 2 additions & 2 deletions noodles-fasta/src/fai/async.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mod reader;
//! Async FAI.

pub use self::reader::Reader;
pub mod io;
5 changes: 5 additions & 0 deletions noodles-fasta/src/fai/async/io.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//! Async FAI I/O.

mod reader;

pub use self::reader::Reader;
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ where
/// ```
/// use noodles_fasta::fai;
/// let data = [];
/// let mut reader = fai::AsyncReader::new(&data[..]);
/// let mut reader = fai::r#async::io::Reader::new(&data[..]);
/// ```
pub fn new(inner: R) -> Self {
Self { inner }
Expand All @@ -38,7 +38,7 @@ where
/// use noodles_fasta::fai;
///
/// let data = b"sq0\t13\t5\t80\t81\nsq1\t21\t19\t80\t81\n";
/// let mut reader = fai::AsyncReader::new(&data[..]);
/// let mut reader = fai::r#async::io::Reader::new(&data[..]);
///
/// let index = reader.read_index().await?;
///
Expand Down

0 comments on commit e4116cb

Please sign in to comment.