-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions
Description
If we have a function that does not return a type and has return
as last statement, we could suggest that that return could be omitted:
pub fn a() {
println!("blurb");
return; // unneeded
}
pub fn b() {
println!("blarb");
return // unneeded
}
=>
pub fn a() {
println!("blurb");
}
pub fn b() {
println!("blarb");
}
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions