3 Checks for binary comparisons to a literal `Option::None`.
7 A programmer checking if some `foo` is `None` via a comparison `foo == None`
8 is usually inspired from other programming languages (e.g. `foo is None`
10 Checking if a value of type `Option<T>` is (not) equal to `None` in that
11 way relies on `T: PartialEq` to do the comparison, which is unneeded.
15 fn foo(f: Option<u32>) -> &'static str {
16 if f != None { "yay" } else { "nay" }
21 fn foo(f: Option<u32>) -> &'static str {
22 if f.is_some() { "yay" } else { "nay" }