Closed
Description
What it does
Warns the user on a Drop
impl that does nothing
Lint Name
empty_drop
Category
correctness
Advantage
- Empty drops do nothing, as the value recursively drops the remaining values after running the
Drop
impl
Drawbacks
None
Example
struct Foo;
impl Drop for Foo {
fn drop(&mut self) {}
}
Could be written as:
struct Foo;