allow needless_option_take to report for more cases (#13684)
changelog: ``` changelog: [`needless_option_take`]: now lints for all temporary expressions of type Option<T>. ``` fixes #13671 In general, needless_option_take should report whenever take() is called on a temporary value, not just when the temporary value is created by as_ref(). Also, we stop emitting machine applicable fixes in these cases, since sometimes the intention of the user is to actually clear the original option, in cases such as `option.as_mut().take()`.
C
Catherine Flores committed
62407104fbdfe6b5642c56c97b6c3693ca8a1207
Committed by GitHub <noreply@github.com>
on 12/14/2024, 7:50:55 PM