Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
olliecheng authored and audy committed Dec 4, 2024
1 parent f48ad5e commit 5a96081
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/parser/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,14 @@ mod test {
use std::io::Cursor;

use crate::parse_fastx_reader;
fn seq(s: &[u8]) -> Cursor<&[u8]> { Cursor::new(s) }
fn seq(s: &[u8]) -> Cursor<&[u8]> {
Cursor::new(s)
}

#[test]
fn test_start_line_number() {
let mut reader = parse_fastx_reader(seq(
b"@test\nACGT\n+\nIIII\n@test2\nACGT\n+\nIIII"
)).unwrap();
let mut reader =
parse_fastx_reader(seq(b"@test\nACGT\n+\nIIII\n@test2\nACGT\n+\nIIII")).unwrap();

let rec = reader.next().unwrap().unwrap();
assert_eq!(rec.start_line_number(), 1);
Expand All @@ -249,8 +250,9 @@ mod test {
#[test]
fn test_position() {
let mut reader = parse_fastx_reader(seq(
b"@test1\nACGT\n+\nIIII\n@test222\nACGT\n+\nIIII\n@test3\nACGT\n+\nIIII"
)).unwrap();
b"@test1\nACGT\n+\nIIII\n@test222\nACGT\n+\nIIII\n@test3\nACGT\n+\nIIII",
))
.unwrap();

let rec = reader.next().unwrap().unwrap();
assert_eq!(rec.position().byte(), 0);
Expand All @@ -261,4 +263,4 @@ mod test {
let rec = reader.next().unwrap().unwrap();
assert_eq!(rec.position().byte(), 40);
}
}
}

0 comments on commit 5a96081

Please sign in to comment.