Skip to content

Commit

Permalink
vcf/io/writer/record/info/field/value/array: Percent-encode string va…
Browse files Browse the repository at this point in the history
…lues
  • Loading branch information
zaeleus committed Sep 12, 2024
1 parent 1f71503 commit d39daa3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions noodles-vcf/src/io/writer/record/info/field/value/array.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::io::{self, Write};

use super::write_character;
use super::{write_character, write_string};
use crate::{io::writer::record::MISSING, variant::record::info::field::value::Array};

pub(super) fn write_array<W>(writer: &mut W, array: &Array) -> io::Result<()>
Expand Down Expand Up @@ -62,7 +62,7 @@ where
}

if let Some(s) = result? {
writer.write_all(s.as_bytes())?;
write_string(writer, &s)?;
} else {
writer.write_all(MISSING)?;
}
Expand Down Expand Up @@ -115,7 +115,7 @@ mod tests {
Some(String::from(":")),
None,
]);
t(&mut buf, &array, b"noodles,:,.")?; // FIXME
t(&mut buf, &array, b"noodles,%3A,.")?;

Ok(())
}
Expand Down

0 comments on commit d39daa3

Please sign in to comment.