Skip to content

Commit

Permalink
bump needletail
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Jul 8, 2020
1 parent a7089eb commit e03d2e9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fixedbitset = "0.3.0"
log = "0.4.8"
md5 = "0.7.0"
murmurhash3 = "0.0.5"
niffler = { version = "3.0.0", default-features = false, features = [ "gz" ], git = "https://github.com/luizirber/niffler.git", branch = "send" }
niffler = { version = "2.2.0", default-features = false, features = [ "gz" ] }
nohash-hasher = "0.2.0"
once_cell = "1.3.1"
rayon = { version = "1.3.0", optional = true }
Expand Down Expand Up @@ -61,7 +61,7 @@ rand = "0.7.3"
tempfile = "3.1.0"

[dev-dependencies.needletail]
version = "0.3.2"
version = "0.4.0"
default-features = false

[[bench]]
Expand Down
2 changes: 1 addition & 1 deletion src/core/src/index/linear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ where

pub fn from_reader<R, P>(rdr: R, path: P) -> Result<LinearIndex<L>, Error>
where
R: Read + Send,
R: Read,
P: AsRef<Path>,
{
// TODO: check https://serde.rs/enum-representations.html for a
Expand Down
2 changes: 1 addition & 1 deletion src/core/src/index/sbt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ where

pub fn from_reader<R, P>(mut rdr: R, path: P) -> Result<SBT<Node<U>, T>, Error>
where
R: Read + Send,
R: Read,
P: AsRef<Path>,
{
// TODO: I would love to do this, but I get an untagged enum error with
Expand Down
19 changes: 8 additions & 11 deletions src/core/src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl Signature {

pub fn from_reader<R>(rdr: R) -> Result<Vec<Signature>, Error>
where
R: io::Read + Send,
R: io::Read,
{
let (rdr, _format) = niffler::get_reader(Box::new(rdr))?;

Expand All @@ -244,7 +244,7 @@ impl Signature {
_scaled: Option<u64>,
) -> Result<Vec<Signature>, Error>
where
R: io::Read + Send,
R: io::Read,
{
let orig_sigs = Signature::from_reader(buf)?;

Expand Down Expand Up @@ -426,7 +426,7 @@ mod test {
use std::io::{BufReader, Read};
use std::path::PathBuf;

use needletail::parse_sequence_reader;
use needletail::parse_fastx_reader;

use crate::cmd::ComputeParameters;
use crate::signature::SigsTrait;
Expand Down Expand Up @@ -559,14 +559,11 @@ mod test {
let mut f = File::open("../../tests/test-data/ecoli.genes.fna").unwrap();
let _ = f.read_to_end(&mut data);

parse_sequence_reader(
&data[..],
|_| {},
|rec| {
sig.add_sequence(&rec.seq, false).unwrap();
},
)
.unwrap();
let mut parser = parse_fastx_reader(&data[..]).unwrap();
while let Some(record) = parser.next() {
let record = record.unwrap();
sig.add_sequence(&record.seq(), false).unwrap();
}

let sketches = sig.sketches();
assert_eq!(sketches.len(), 12);
Expand Down
2 changes: 1 addition & 1 deletion src/core/src/sketch/nodegraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl Nodegraph {

pub fn from_reader<R>(rdr: R) -> Result<Nodegraph, Error>
where
R: io::Read + Send,
R: io::Read,
{
let (mut rdr, _format) = niffler::get_reader(Box::new(rdr))?;

Expand Down

0 comments on commit e03d2e9

Please sign in to comment.