You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C-bugCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.T-middleType: Probably requires verifiying types
Hi there. I was surprised to find that clippy warns on foo.map(CStr::as_ptr).unwrap_or(ptr::null_mut()). Given that null_mut is a const fn, forcing it to be in unwrap_or_else(|| ptr::null_mut()) is just noise. (I'm also unsure whether enum constructors are technically const fns, but fixing this could potentially fix #1338)
The text was updated successfully, but these errors were encountered:
oli-obk
added
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
C-bug
Category: Clippy is not doing the correct thing
T-middle
Type: Probably requires verifiying types
labels
Feb 10, 2017
I cannot reproduce even in diesel's repo and this should have been fixed in #917. The original PR on diesel is older than #917, this might have been the problem.
I can however reproduce #1338.
Feel free to reopen if you have a reproducible example.
C-bugCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.T-middleType: Probably requires verifiying types
Hi there. I was surprised to find that clippy warns on
foo.map(CStr::as_ptr).unwrap_or(ptr::null_mut())
. Given thatnull_mut
is aconst fn
, forcing it to be inunwrap_or_else(|| ptr::null_mut())
is just noise. (I'm also unsure whether enum constructors are technicallyconst fn
s, but fixing this could potentially fix #1338)The text was updated successfully, but these errors were encountered: