Skip to content

Commit 28cebf8

Browse files
author
Markus Schlegel
committed
rustfmt
1 parent 7164806 commit 28cebf8

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

src/fasta.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ impl Reader<File, DefaultPolicy> {
159159
/// if configured so with an according [buffer policy](policy).
160160
/// The minimum allowed capacity is 3.
161161
#[inline]
162-
pub fn from_path_with_capacity<P: AsRef<Path>>(path: P, cap: usize) -> io::Result<Reader<File>> {
162+
pub fn from_path_with_capacity<P: AsRef<Path>>(
163+
path: P,
164+
cap: usize,
165+
) -> io::Result<Reader<File>> {
163166
File::open(path).map(|f| Reader::with_capacity(f, cap))
164167
}
165168
}

src/fastq.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ impl Reader<File, DefaultBufPolicy> {
120120
/// if configured so with an according [buffer policy](policy).
121121
/// The minimum allowed capacity is 3.
122122
#[inline]
123-
pub fn from_path_with_capacity<P: AsRef<Path>>(path: P, cap: usize) -> io::Result<Reader<File>> {
123+
pub fn from_path_with_capacity<P: AsRef<Path>>(
124+
path: P,
125+
cap: usize,
126+
) -> io::Result<Reader<File>> {
124127
File::open(path).map(|f| Reader::with_capacity(f, cap))
125128
}
126129
}

tests/fasta.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ fn test_long_fasta_read_record_set_with_initialized_reader() {
398398

399399
#[test]
400400
fn test_fasta_mixed_read_seek() {
401-
use io::{Write, Cursor};
401+
use io::{Cursor, Write};
402402
let mut fasta = Vec::with_capacity(13 * 100);
403403
let mut l5 = 0;
404404
for i in 1..101 {
@@ -430,7 +430,7 @@ fn test_fasta_mixed_read_seek() {
430430
}
431431
}
432432
}
433-
while let Some(r) = rdr.next() {
433+
while let Some(r) = rdr.next() {
434434
r.unwrap().write_wrap(&mut out, 2).unwrap();
435435
}
436436
rdr.seek(&pos10).unwrap();
@@ -455,11 +455,11 @@ fn test_fasta_mixed_read_seek() {
455455
}
456456
}
457457
}
458-
while let Some(r) = rdr.next() {
458+
while let Some(r) = rdr.next() {
459459
r.unwrap().write_wrap(&mut out, 2).unwrap();
460460
}
461461
rdr.seek(&pos0).unwrap();
462-
while let Some(r) = rdr.next() {
462+
while let Some(r) = rdr.next() {
463463
r.unwrap().write_wrap(&mut out, 2).unwrap();
464464
}
465465
assert_eq!(&out[..l100], &fasta);
@@ -472,7 +472,7 @@ fn test_fasta_mixed_read_seek() {
472472
for r in rset.into_iter() {
473473
r.write_wrap(&mut out, 2).unwrap();
474474
}
475-
while let Some(r) = rdr.next() {
475+
while let Some(r) = rdr.next() {
476476
r.unwrap().write_wrap(&mut out, 2).unwrap();
477477
}
478478
assert_eq!(&out, &fasta);

tests/fastq.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ fn test_long_fastq_read_record_set_with_initialized_reader() {
397397

398398
#[test]
399399
fn test_fastq_mixed_read_seek() {
400-
use io::{Write, Cursor};
400+
use io::{Cursor, Write};
401401
let mut fastq = Vec::with_capacity(19 * 100);
402402
let mut l5 = 0;
403403
for i in 1..101 {
@@ -429,7 +429,7 @@ fn test_fastq_mixed_read_seek() {
429429
}
430430
}
431431
}
432-
while let Some(r) = rdr.next() {
432+
while let Some(r) = rdr.next() {
433433
r.unwrap().write(&mut out).unwrap();
434434
}
435435
rdr.seek(&pos10).unwrap();
@@ -454,11 +454,11 @@ fn test_fastq_mixed_read_seek() {
454454
}
455455
}
456456
}
457-
while let Some(r) = rdr.next() {
457+
while let Some(r) = rdr.next() {
458458
r.unwrap().write(&mut out).unwrap();
459459
}
460460
rdr.seek(&pos0).unwrap();
461-
while let Some(r) = rdr.next() {
461+
while let Some(r) = rdr.next() {
462462
r.unwrap().write(&mut out).unwrap();
463463
}
464464
assert_eq!(&out[..l100], &fastq);
@@ -471,7 +471,7 @@ fn test_fastq_mixed_read_seek() {
471471
for r in rset.into_iter() {
472472
r.write(&mut out).unwrap();
473473
}
474-
while let Some(r) = rdr.next() {
474+
while let Some(r) = rdr.next() {
475475
r.unwrap().write(&mut out).unwrap();
476476
}
477477
assert_eq!(&out, &fastq);

0 commit comments

Comments
 (0)