19 lines
No EOL
278 B
Text
19 lines
No EOL
278 B
Text
### What it does
|
|
Checks for return statements at the end of a block.
|
|
|
|
### Why is this bad?
|
|
Removing the `return` and semicolon will make the code
|
|
more rusty.
|
|
|
|
### Example
|
|
```
|
|
fn foo(x: usize) -> usize {
|
|
return x;
|
|
}
|
|
```
|
|
simplify to
|
|
```
|
|
fn foo(x: usize) -> usize {
|
|
x
|
|
}
|
|
``` |