Skip to content

Commit 8c68339

Browse files
⚡ Bolt: Fix formatting to pass CI
💡 What: - Run `cargo fmt` to fix code formatting in `src/parser.rs` and `src/value.rs` which were causing the `cargo fmt -- --check` CI action to fail. 🎯 Why: The previous commit included changes that were auto-formatted by `cargo clippy --fix`, leading to style violations that resulted in CI pipeline failures. 📊 Impact: - Restores passing CI builds. 🔬 Measurement: - Locally ran `cargo fmt -- --check` which now succeeds. Co-authored-by: ashyanSpada <22587148+ashyanSpada@users.noreply.github.com>
1 parent 183b3aa commit 8c68339

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

src/parser.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,7 @@ impl<'a> Parser<'a> {
417417
pub fn new(input: &'a str) -> Result<Self> {
418418
let mut tokenizer = Tokenizer::new(input);
419419
tokenizer.next()?;
420-
Ok(Self {
421-
tokenizer,
422-
})
420+
Ok(Self { tokenizer })
423421
}
424422

425423
fn is_eof(&self) -> bool {

src/value.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,7 @@ impl Value {
106106

107107
pub fn float(self) -> Result<f64> {
108108
match self {
109-
Self::Number(val) => val
110-
.to_string()
111-
.parse()
112-
.map_or(Err(Error::InvalidFloat), Ok),
109+
Self::Number(val) => val.to_string().parse().map_or(Err(Error::InvalidFloat), Ok),
113110
_ => Err(Error::InvalidFloat),
114111
}
115112
}

0 commit comments

Comments
 (0)