This is a pretty brave statement. Maybe check https://doc.rust-lang.org/rustc/lints/groups.html how many lints get knocked out by this (scroll to the bottom).
So you can use this:
#![allow(unused_imports)]`
Just add an initial underscore to unused variables:
fn some_callback(x: u32, _y: u32) -> u32 {
x + 1
}
Hmm, so Rust is not C. It's a different language, different style, different ideas, different solutions.
For experienced programmers in one language like you, it's not easy to unlearn some known patterns and to sink into the new language.
Maybe, some idea:
Is it really necessary, to use upper case? Why not stick to Rust conventions?
Dump the unnecessary Types postfix, qualify enum members, use Self, remove unnecessary return, and omit the parenthesis in the match argument:
pub enum PlayerItem {
MagicLamp,
DeathDoll,
ScrollOfExit,
}
impl PlayerItem {
pub fn get_display_name(&self) -> &str {
match self {
Self::MagicLamp => "Magic Lamp",
Self::DeathDoll => "Death Doll",
Self::ScrollOfExit => "Scroll of Exit",
}
}
}