Take this example code.
trait MyThing {
fn do_stuff(&self) -> bool;
fn do_other_stuff(&self) -> bool;
}
struct Other {}
impl MyThing for Other {
fn do_stuff(&self) -> bool {
true
}
fn do_other_stuff(&self) -> bool {
true
}
}
fn main() {
let thing = Other {};
thing.do_stuff();
// NOTE: We never call `do_other_stuff`.
}
Even though we never call do_other_stuff, the compiler does not generate a warning that this trait method is unused. We've defined an implementation for it, but this doesn't mean that the method is used.
Apologies if this issue has already been raised.
Take this example code.
Even though we never call
do_other_stuff, the compiler does not generate a warning that this trait method is unused. We've defined an implementation for it, but this doesn't mean that the method is used.Apologies if this issue has already been raised.