2 Checks for match which is used to add a reference to an
6 Using `as_ref()` or `as_mut()` instead is shorter.
10 let x: Option<()> = None;
12 let r: Option<&()> = match x {
14 Some(ref v) => Some(v),
20 let x: Option<()> = None;
22 let r: Option<&()> = x.as_ref();