From f29f1203aa80febba9f9b5d12d24185c3c9c0db1 Mon Sep 17 00:00:00 2001 From: Stefano Amorelli Date: Sun, 17 Aug 2025 14:03:42 +0300 Subject: [PATCH] style: fix formatting --- benches/parser.rs | 4 ++-- src/simple_parser.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benches/parser.rs b/benches/parser.rs index f3058ad..9ed11b1 100644 --- a/benches/parser.rs +++ b/benches/parser.rs @@ -5,7 +5,7 @@ use std::path::Path; fn parse_sample_sec_file(c: &mut Criterion) { let parser = Parser::new(); let sample_file = Path::new("fixtures/sample-sec.xml"); - + if sample_file.exists() { c.bench_function("parse_sample_sec", |b| { b.iter(|| parser.parse_file(black_box(&sample_file))); @@ -26,7 +26,7 @@ fn parse_sample_sec_file(c: &mut Criterion) { iso4217:USD "#; - + c.bench_function("parse_minimal", |b| { b.iter(|| parser.parse_str(black_box(minimal_xbrl))); }); diff --git a/src/simple_parser.rs b/src/simple_parser.rs index ae98025..0f6aa36 100644 --- a/src/simple_parser.rs +++ b/src/simple_parser.rs @@ -17,7 +17,7 @@ impl Parser { pub fn parse_str(&self, content: &str) -> Result { self.parse_bytes(content.as_bytes()) } - + pub fn parse_file>(&self, path: P) -> Result { let content = std::fs::read(path)?; self.parse_bytes(&content)