You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `as_str` methods on `Severity`, `Scope`, and `FailOn` in `crates/diffguard-types/src/lib.rs` (lines 52, 71, 90) are flagged by `clippy::missing_const_for_fn`:
```rust
pub fn as_str(self) -> &'static str {
match self {
Severity::Info => "info",
Severity::Warn => "warn",
Severity::Error => "error",
}
}
```
These should be `pub const fn as_str` — the match is a simple constant expression with no side effects, and making them const enables compile-time evaluation. Low effort fix, just add `const` to all three.
Note: `#185` already covers adding `#[must_use]` to these same methods — the two issues could theoretically be combined, but they are distinct fixes so keeping separate.