3 #![warn(clippy::manual_map)]
4 #![allow(clippy::no_effect, clippy::map_identity, clippy::unit_arg, clippy::match_ref_pats)]
13 Some(x) => Some(x + 1),
18 Some(x) => Some(x.is_empty()),
22 if let Some(x) = Some(0) {
30 Some(x) => { Some(std::convert::identity(x)) }
34 match Some(&String::new()) {
35 Some(x) => Some(str::len(x)),
40 Some(x) if false => Some(x + 1),
45 Some(x) => Some(x[0]),
50 &Some(x) => Some(x * 2),
54 match Some(String::new()) {
55 Some(ref x) => Some(x.is_empty()),
59 match &&Some(String::new()) {
60 Some(x) => Some(x.len()),
65 &&Some(x) => Some(x + x),
69 match &mut Some(String::new()) {
70 Some(x) => Some(x.push_str("")),
74 match &mut Some(String::new()) {
75 Some(ref x) => Some(&**x),
79 match &mut &Some(String::new()) {
80 Some(x) => Some(x.is_empty()),
84 match Some((0, 1, 2)) {
85 Some((x, y, z)) => Some(x + y + z),
89 match Some([1, 2, 3]) {
90 Some([first, ..]) => Some(first),
94 match &Some((String::new(), "test")) {
95 Some((x, y)) => Some((y, x)),
99 match Some((String::new(), 0)) {
100 Some((ref x, y)) => Some((y, x)),
104 match Some(Some(0)) {
105 Some(Some(_)) | Some(None) => Some(0),
109 match Some(Some((0, 1))) {
110 Some(Some((x, 1))) => Some(x),