+15
−16
Loading
Use a match expression with slice patterns instead of length checks and indexing. The result is more idiomatic, which is a better example for future Rust code authors. Reviewed-by:Alice Ryhl <aliceryhl@google.com> Signed-off-by:
Tamir Duberstein <tamird@gmail.com> Link: https://lore.kernel.org/r/20250529-idiomatic-match-slice-v2-1-4925ca2f1550@gmail.com [ Reworded title. - Miguel ] Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>