Skip to content

Commit

Permalink
gff/io/writer/line/directive: Move value writer to module
Browse files Browse the repository at this point in the history
  • Loading branch information
zaeleus committed Nov 22, 2024
1 parent 9b426cd commit 89c037f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 1 addition & 7 deletions noodles-gff/src/io/writer/line/directive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ mod value;

use std::io::{self, Write};

use self::value::write_value;
use crate::{directive_buf::key, DirectiveBuf};

pub(super) fn write_directive<W>(writer: &mut W, directive: &DirectiveBuf) -> io::Result<()>
Expand Down Expand Up @@ -61,10 +62,3 @@ where
const SEPARATOR: u8 = b' ';
writer.write_all(&[SEPARATOR])
}

fn write_value<W>(writer: &mut W, value: &str) -> io::Result<()>
where
W: Write,
{
writer.write_all(value.as_bytes())
}
9 changes: 9 additions & 0 deletions noodles-gff/src/io/writer/line/directive/value.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
mod gff_version;
mod sequence_region;

use std::io::{self, Write};

pub(super) use self::{gff_version::write_gff_version, sequence_region::write_sequence_region};

pub(super) fn write_value<W>(writer: &mut W, value: &str) -> io::Result<()>
where
W: Write,
{
writer.write_all(value.as_bytes())
}

0 comments on commit 89c037f

Please sign in to comment.