From 26f147c0def246726166ac3a1e3f48639fbfdbbb Mon Sep 17 00:00:00 2001 From: Stefano Amorelli Date: Sun, 17 Aug 2025 13:30:09 +0300 Subject: [PATCH] style: add rustfmt config and fix spacing - Add .rustfmt.toml for consistent formatting - Fix blank line spacing in lib.rs - Remove trailing spaces from doc comments --- .rustfmt.toml | 2 ++ src/lib.rs | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .rustfmt.toml diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..c0778a0 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,2 @@ +# Rust formatting configuration +edition = "2021" \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 6097622..16ee1cb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ //! crabrl - High-performance XBRL parser and validator -//! +//! //! Licensed under AGPL-3.0 pub mod model; @@ -26,7 +26,7 @@ impl Validator { strict: false, } } - + pub fn with_config(config: ValidationConfig) -> Self { let mut inner = validator::XbrlValidator::new(); if config.strict { @@ -37,14 +37,14 @@ impl Validator { strict: config.strict, } } - + pub fn sec_edgar() -> Self { Self { inner: validator::XbrlValidator::new().strict(), strict: true, } } - + pub fn validate(&self, doc: &Document) -> Result { let start = std::time::Instant::now();