Files
rust/src/docs/default_trait_access.txt
T

16 lines
289 B
Plaintext

### What it does
Checks for literal calls to `Default::default()`.
### Why is this bad?
It's easier for the reader if the name of the type is used, rather than the
generic `Default`.
### Example
```
let s: String = Default::default();
```
Use instead:
```
let s = String::default();
```