Skip to content

Test/updating testing - #26

Merged
Dreycey merged 5 commits into
mainfrom
test/updating_testing
Mar 9, 2026
Merged

Test/updating testing#26
Dreycey merged 5 commits into
mainfrom
test/updating_testing

Conversation

@Dreycey

@Dreycey Dreycey commented Mar 9, 2026

Copy link
Copy Markdown
Owner

This PR updates existing tests, removes dead code, and performs several optimizations.

Dreycey and others added 5 commits March 7, 2026 13:38
Changes across all source files:

- Remove dead code: delete unused src/read_parser.rs (old duplicate of file_parser.rs)
  and src/test.sh (unrelated rainbow ASCII script)
- Pin bio dependency from "*" to "2.2.0"

bloom_filter.rs:
- Remove unnecessary std::ops::Drop import and extra blank lines
- Merge duplicate std::io imports
- Use field shorthand and implicit returns
- Optimize distance() to avoid cloning entire BitVec (zero-allocation iterator)

bloom_filter/hash_iter.rs:
- Use BuildHasher::hash_one() instead of manual hash construction
- Remove unused Hasher import, use field shorthand, clean up blank lines

bloom_tree.rs:
- Remove redundant 'static lifetime on constant
- Remove unnecessary -> () return type and .clone() calls
- Replace explicit returns with implicit returns
- Simplify prune_tree conditional guards

file_parser.rs:
- Change get_kmers(&Vec<u8>) to idiomatic &[u8]
- Fix kmer_size <= 0 (always false for usize) to kmer_size == 0
- Remove commented-out code blocks
- Deduplicate FASTA/FASTQ branches in next_read()
- Increase BufReader capacity from 100 bytes to 8192

query.rs:
- Remove explicit returns and unused kmer_size parameter
- Use .copied() instead of .map(|&x| x)
- Replace .write() with .write_all() for correctness
- Reduce unnecessary cloning in leaf node mapping

result_map.rs:
- Change &String parameters to idiomatic &str
- Use entry().or_default() API instead of get_mut/else/insert
- Remove commented-out debug println

cache.rs:
- Change &PathBuf to &Path in trait and impl signatures
- Replace println! cache-miss message with log::warn!

main.rs:
- Remove unused 'use log' import
- Fix 'cuttoff' typo to 'cutoff'
- Use if-let for search_depth instead of double unwrap()
- Change &PathBuf to &Path in helper function
- Remove unnecessary &mut on read_block

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Dreycey
Dreycey merged commit 1972164 into main Mar 9, 2026
@Dreycey
Dreycey deleted the test/updating_testing branch March 9, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant