chore: Fix lint errors in lookup.rs (#530)

- Made the lookup module crate-visible to address clippy’s redundant visibility lint.
- Replaced unchecked as casts with a fallible usize_from_u32 helper and propagate conversion errors in lookup accessors.
- Switched LookupIndexError to implement core::error::Error for no_std correctness.
- Fixed the pattern type mismatch by matching on the value in the Display impl.
- Promoted trivial helpers to const fn (new, module_len) per clippy suggestions.
- Centralized bounds-checked slot access via slot_ref/slot_mut to keep getters/clearers lint-clean and avoid unchecked indexing.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2025-12-29 13:53:46 -06:00
committed by GitHub
parent 249dcd0b43
commit 1d71df30b6
2 changed files with 93 additions and 57 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ pub mod languages {
}
mod lexer;
mod lookup;
pub(crate) mod lookup;
mod number;
mod parser;
mod policy_info;