Skip to content

Commit

Permalink
feat: use equality for xnor operation on booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
lavafroth authored and wwood committed Feb 20, 2024
1 parent b061cee commit f2f27bd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ impl ReferenceSortedBamFilter {
self.min_percent_identity_single,
self.min_aligned_percent_single,
);
if (passes_filter2 && self.filter_out) || (!passes_filter2 && !self.filter_out)
{
if passes_filter2 == self.filter_out {
return res;
}
}
Expand Down Expand Up @@ -193,9 +192,7 @@ impl ReferenceSortedBamFilter {
self.min_percent_identity_pair,
self.min_aligned_percent_pair,
);
if (passes_filter && self.filter_out)
|| (!passes_filter && !self.filter_out)
{
if passes_filter == self.filter_out {
debug!("Read pair passed QC");
self.known_next_read = Some(record.clone());
record.clone_from(
Expand Down

0 comments on commit f2f27bd

Please sign in to comment.