Skip to content

Commit 13631b2

Browse files
Apply rustfmt for 2024 edition import sorting
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1015472 commit 13631b2

File tree

10 files changed

+11
-15
lines changed

10 files changed

+11
-15
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/alignment/block_reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::io::Read;
1212
use std::num::NonZeroUsize;
1313
use std::path::Path;
1414

15-
use super::minimal_parser::{get_record_size, parse_bam_record, MinimalRecord};
15+
use super::minimal_parser::{MinimalRecord, get_record_size, parse_bam_record};
1616
use crate::annotation::AnnotationIndex;
1717

1818
/// Size of each batch of decompressed BAM data (target ~4MB per batch)

src/alignment/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ pub mod minimal_parser;
44
mod paired;
55
mod reader;
66

7-
pub use cigar::{total_overlap, Interval};
7+
pub use cigar::{Interval, total_overlap};
88
pub use paired::{MateTracker, PendingMate};
99
pub use reader::{AlignmentReader, AlignmentRecord};

src/annotation/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub use feature::{Feature, Strand};
88
pub use index::AnnotationIndex;
99

1010
use crate::cli::Args;
11-
use anyhow::{bail, Result};
11+
use anyhow::{Result, bail};
1212
use log::info;
1313

1414
/// Load annotation from GTF/GFF file and build spatial index.

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use clap::{builder::styling, Parser, ValueEnum};
1+
use clap::{Parser, ValueEnum, builder::styling};
22
use std::path::PathBuf;
33

44
fn styles() -> styling::Styles {

src/counting/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mod stats;
77
mod worker;
88

99
pub use constants::{
10-
channel_buffer_size, mate_tracker_shards, threads_per_file, FRACTION_MULTIPLIER,
10+
FRACTION_MULTIPLIER, channel_buffer_size, mate_tracker_shards, threads_per_file,
1111
};
1212
pub use filtering::Filterable;
1313

@@ -20,8 +20,8 @@ use crossbeam::channel;
2020
use indicatif::{ProgressBar, ProgressStyle};
2121
use log::{debug, info};
2222
use rayon::prelude::*;
23-
use std::sync::atomic::{AtomicUsize, Ordering};
2423
use std::sync::Arc;
24+
use std::sync::atomic::{AtomicUsize, Ordering};
2525

2626
use crate::alignment::block_reader::BamBlockReader;
2727
use crate::alignment::{AlignmentReader, AlignmentRecord, MateTracker, PendingMate};

src/counting/worker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use std::sync::Arc;
77

88
use crate::alignment::block_reader::RecordBatch;
9-
use crate::alignment::minimal_parser::{get_record_size, parse_bam_record, MinimalRecord};
9+
use crate::alignment::minimal_parser::{MinimalRecord, get_record_size, parse_bam_record};
1010
use crate::alignment::total_overlap;
1111
use crate::annotation::{AnnotationIndex, Strand};
1212
use crate::cli::{Args, StrandMode};

src/output/counts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use anyhow::{Context, Result};
2-
use flate2::write::GzEncoder;
32
use flate2::Compression;
3+
use flate2::write::GzEncoder;
44
use rustc_hash::FxHashMap;
55
use std::fs::File;
66
use std::io::{BufWriter, Write};

tests/common/expected.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,7 @@ fn compare_gene_level(
115115
}
116116
}
117117

118-
if diffs.is_empty() {
119-
Ok(())
120-
} else {
121-
Err(diffs)
122-
}
118+
if diffs.is_empty() { Ok(()) } else { Err(diffs) }
123119
}
124120

125121
fn counts_match(actual: f64, expected: f64, tolerance: f64) -> bool {

tests/counting_params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ fn test_multiple_hits_same_gene_returns_unique() {
243243
#[test]
244244
fn test_multiple_genes_without_multi_overlap_returns_ambiguous() {
245245
let args = default_args(); // allow_multi_overlap = false
246-
// Two features from different genes
246+
// Two features from different genes
247247
let hits = vec![
248248
FeatureHit {
249249
feature_idx: 0,

0 commit comments

Comments
 (0)