Skip to content

Commit

Permalink
sam/async/io/reader: Simplify examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zaeleus committed Dec 20, 2024
1 parent e13eeb8 commit 31d9b0b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions noodles-sam/src/async/io/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ impl<R> Reader<R> {
///
/// ```
/// use noodles_sam as sam;
/// let data = [];
/// let reader = sam::r#async::io::Reader::new(&data[..]);
/// assert!(reader.get_ref().is_empty());
/// use tokio::io;
/// let reader = sam::r#async::io::Reader::new(io::empty());
/// let _inner = reader.get_ref();
/// ```
pub fn get_ref(&self) -> &R {
&self.inner
Expand All @@ -39,9 +39,9 @@ impl<R> Reader<R> {
///
/// ```
/// use noodles_sam as sam;
/// let data = [];
/// let mut reader = sam::r#async::io::Reader::new(&data[..]);
/// assert!(reader.get_mut().is_empty());
/// use tokio::io;
/// let mut reader = sam::r#async::io::Reader::new(io::empty());
/// let _inner = reader.get_mut();
/// ```
pub fn get_mut(&mut self) -> &mut R {
&mut self.inner
Expand All @@ -53,9 +53,9 @@ impl<R> Reader<R> {
///
/// ```
/// use noodles_sam as sam;
/// let data = [];
/// let reader = sam::r#async::io::Reader::new(&data[..]);
/// assert!(reader.into_inner().is_empty());
/// use tokio::io;
/// let reader = sam::r#async::io::Reader::new(io::empty());
/// let _inner = reader.into_inner();
/// ```
pub fn into_inner(self) -> R {
self.inner
Expand All @@ -72,8 +72,8 @@ where
///
/// ```
/// use noodles_sam as sam;
/// let data = [];
/// let reader = sam::r#async::io::Reader::new(&data[..]);
/// use tokio::io;
/// let reader = sam::r#async::io::Reader::new(io::empty());
/// ```
pub fn new(inner: R) -> Self {
Self {
Expand Down

0 comments on commit 31d9b0b

Please sign in to comment.