fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1#![warn(clippy::all, clippy::or_fun_call)] 2#![allow(clippy::unnecessary_literal_unwrap)] 3 4fn main() { 5 let s = Some(String::from("test string")).unwrap_or_else(|| "Fail".to_string()).len(); 6 //~^ ERROR: use of `unwrap_or` followed by a function call 7 //~| NOTE: `-D clippy::or-fun-call` implied by `-D warnings` 8} 9 10fn new_lines() { 11 let s = Some(String::from("test string")).unwrap_or_else(|| "Fail".to_string()).len(); 12 //~^ ERROR: use of `unwrap_or` followed by a function call 13}