]>
Commit | Line | Data |
---|---|---|
487cf647 | 1 | #![warn(clippy::all, clippy::or_fun_call)] |
fe692bf9 | 2 | #![allow(clippy::unnecessary_literal_unwrap)] |
f20569fa XL |
3 | |
4 | fn main() { | |
5 | let s = Some(String::from("test string")).unwrap_or("Fail".to_string()).len(); | |
781aab86 FG |
6 | //~^ ERROR: use of `unwrap_or` followed by a function call |
7 | //~| NOTE: `-D clippy::or-fun-call` implied by `-D warnings` | |
f20569fa XL |
8 | } |
9 | ||
10 | fn new_lines() { | |
11 | let s = Some(String::from("test string")).unwrap_or("Fail".to_string()).len(); | |
781aab86 | 12 | //~^ ERROR: use of `unwrap_or` followed by a function call |
f20569fa | 13 | } |