style: fix formatting for rustfmt compliance

- Add trailing newlines to all source files
- Remove extra blank lines
- Simplify closure formatting in benchmarks
This commit is contained in:
Stefano Amorelli
2025-08-16 17:43:01 +03:00
parent 5f8585c434
commit b7a229ead9
5 changed files with 15 additions and 15 deletions

View File

@@ -6,9 +6,7 @@ fn parse_small_file(c: &mut Criterion) {
let content = include_bytes!("../tests/fixtures/small.xml");
c.bench_function("parse_small", |b| {
b.iter(|| {
parser.parse_bytes(black_box(content))
});
b.iter(|| parser.parse_bytes(black_box(content)));
});
}
@@ -17,11 +15,10 @@ fn parse_medium_file(c: &mut Criterion) {
let content = include_bytes!("../tests/fixtures/medium.xml");
c.bench_function("parse_medium", |b| {
b.iter(|| {
parser.parse_bytes(black_box(content))
});
b.iter(|| parser.parse_bytes(black_box(content)));
});
}
criterion_group!(benches, parse_small_file, parse_medium_file);
criterion_main!(benches);

View File

@@ -34,3 +34,4 @@ fn main() {
}
}
}

View File

@@ -20,3 +20,4 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}

View File

@@ -27,3 +27,4 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}

View File

@@ -17,7 +17,6 @@ fn main() {
Ok(doc) => {
let elapsed = start.elapsed();
let ms = elapsed.as_secs_f64() * 1000.0;
println!("crabrl found: {} facts, {} contexts, {} units (in {:.3}ms)",
doc.facts.len(),
doc.contexts.len(),
@@ -38,3 +37,4 @@ fn main() {
}
}
}