fix clippy
All checks were successful
Rust Checks / checks (push) Successful in 3m22s
Rust Checks / checks (pull_request) Successful in 2m33s

This commit is contained in:
CoCo_Sol 2024-03-11 08:46:03 +01:00
parent 5310e04f2e
commit 270e8c54d1

View file

@ -36,10 +36,10 @@ pub enum SelectedTile {
impl SelectedTile { impl SelectedTile {
/// Returns the index (ID) of the selected tile. /// Returns the index (ID) of the selected tile.
/// Returns `None` if no tile is selected. /// Returns `None` if no tile is selected.
pub fn index(&self) -> Option<u32> { pub const fn index(&self) -> Option<u32> {
match self { match self {
SelectedTile::Tile(index) => Some(*index), Self::Tile(index) => Some(*index),
SelectedTile::None => None, Self::None => None,
} }
} }
} }