FactbirdHQ / atat

no_std crate for parsing AT commands
Apache License 2.0
109 stars 29 forks source link

Fix digest continuation bug #141

Closed rmja closed 1 year ago

rmja commented 1 year ago

The digest should not continue to lower priority cases if the parser returns incomplete.

This fixes #140

MathiasKoch commented 1 year ago

This is a nice catch!

Could you fix the clippy CI, so I can merge it?

rmja commented 1 year ago

cargo clippy does not show anything on my machine. Can you trigger CI to re-run?

MathiasKoch commented 1 year ago

It runs with -- -W clippy::all -W clippy::pedantic -W clippy::nursery -W clippy::cargo in CI

rmja commented 1 year ago

From the CI details I get "Error: Unable to create clippy annotations! Reason: HttpError: Resource not accessible by integration". It seems unrelated to the PR?

MathiasKoch commented 1 year ago

I think this is what it fails on:

error: this could be rewritten as `let...else`
   --> serde_at/src/de/mod.rs:676:5
    |
676 | /     let from = match x.iter().position(|x| !x.is_ascii_whitespace()) {
677 | |         Some(i) => i,
678 | |         None => return &x[0..0],
679 | |     };
    | |______^ help: consider writing: `let Some(i) = x.iter().position(|x| !x.is_ascii_whitespace()) else { return &x[0..0] };`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
note: the lint level is defined here
   --> serde_at/src/lib.rs:6:9
    |
6   | #![deny(warnings)]
    |         ^^^^^^^^
    = note: `#[deny(clippy::manual_let_else)]` implied by `#[deny(warnings)]`
rmja commented 1 year ago

@MathiasKoch it seems happy now:-)