Removing return not sugggested by needless_return
when calling some chained string methods
#12907
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
When having a return statement with a call to
str::trim
, theneedless_return
list does not warn. Replacingtrim
withlen
in the following example correctly warns.It seems to happen with other borrowing methods as well, such as in the following example:
Lint Name
needless_return
Reproducer
I tried this code:
I expected to see this happen:
Instead, this happened:
No output
Version
The text was updated successfully, but these errors were encountered: