Skip to content

Commit

Permalink
MRG: some suggested changes for new dunder methods (#34)
Browse files Browse the repository at this point in the history
* Bump anyhow from 1.0.87 to 1.0.89 (#33)

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.87 to 1.0.89.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](dtolnay/anyhow@1.0.87...1.0.89)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump pyo3 from 0.22.2 to 0.22.3 (#32)

Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.22.2 to 0.22.3.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/v0.22.3/CHANGELOG.md)
- [Commits](PyO3/pyo3@v0.22.2...v0.22.3)

---
updated-dependencies:
- dependency-name: pyo3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* pass thru errors; remove clone

* cargo fmt

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
ctb and dependabot[bot] authored Sep 18, 2024
1 parent 9d95e78 commit 854dc9d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ name = "oxli"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version="0.22.2", features = ["extension-module", "anyhow"] }
pyo3 = { version="0.22.3", features = ["extension-module", "anyhow"] }
sourmash = "0.15.1"
anyhow = "1.0.87"
anyhow = "1.0.89"
log = "0.4.22"
env_logger = "0.11.5"
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Standard library imports
use std::collections::hash_map::IntoIter;
use std::collections::{HashMap, HashSet};

// External crate imports
Expand Down Expand Up @@ -70,10 +71,9 @@ impl KmerCountTable {
"kmer size does not match count table ksize",
))
} else {
let hashval = self.hash_kmer(kmer.clone()).unwrap();
let count = self.count_hash(hashval);
// Update the total sequence length tracker
self.consumed += kmer.len() as u64;
let hashval = self.hash_kmer(kmer)?;
let count = self.count_hash(hashval);
Ok(count)
}
}
Expand Down Expand Up @@ -275,7 +275,7 @@ impl KmerCountTable {
// Iterator implementation for KmerCountTable
#[pyclass]
pub struct KmerCountTableIterator {
inner: std::collections::hash_map::IntoIter<u64, u64>, // Now we own the iterator
inner: IntoIter<u64, u64>, // Now we own the iterator
}

#[pymethods]
Expand Down

0 comments on commit 854dc9d

Please sign in to comment.