Closed
Description
What it does
Checks for struct declarations with empty bodies and suggests removing the {}
Checks for instantiation of structs that have empty bodies and suggests removing the {}
Lint Name
No response
Category
style
Advantage
Makes the code look a little tidier.
Drawbacks
Not sure...
Example 1
struct Dog {}
Could be written as:
struct Dog;
Example 2
// Assuming `struct Dog;` exists
let dog = Dog {};
Could be written as:
// Assuming `struct Dog;` exists
let dog = Dog;