mirror of
https://github.com/stefanoamorelli/crabrl.git
synced 2026-04-18 07:10:42 +00:00
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
This commit is contained in:
2
.rustfmt.toml
Normal file
2
.rustfmt.toml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Rust formatting configuration
|
||||||
|
edition = "2021"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
//! crabrl - High-performance XBRL parser and validator
|
//! crabrl - High-performance XBRL parser and validator
|
||||||
//!
|
//!
|
||||||
//! Licensed under AGPL-3.0
|
//! Licensed under AGPL-3.0
|
||||||
|
|
||||||
pub mod model;
|
pub mod model;
|
||||||
@@ -26,7 +26,7 @@ impl Validator {
|
|||||||
strict: false,
|
strict: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_config(config: ValidationConfig) -> Self {
|
pub fn with_config(config: ValidationConfig) -> Self {
|
||||||
let mut inner = validator::XbrlValidator::new();
|
let mut inner = validator::XbrlValidator::new();
|
||||||
if config.strict {
|
if config.strict {
|
||||||
@@ -37,14 +37,14 @@ impl Validator {
|
|||||||
strict: config.strict,
|
strict: config.strict,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn sec_edgar() -> Self {
|
pub fn sec_edgar() -> Self {
|
||||||
Self {
|
Self {
|
||||||
inner: validator::XbrlValidator::new().strict(),
|
inner: validator::XbrlValidator::new().strict(),
|
||||||
strict: true,
|
strict: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn validate(&self, doc: &Document) -> Result<ValidationResult> {
|
pub fn validate(&self, doc: &Document) -> Result<ValidationResult> {
|
||||||
let start = std::time::Instant::now();
|
let start = std::time::Instant::now();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user