4 #![warn(clippy::match_as_ref)]
7 let owned: Option<()> = None;
8 let borrowed: Option<&()> = match owned {
10 Some(ref v) => Some(v),
13 let mut mut_owned: Option<()> = None;
14 let borrow_mut: Option<&mut ()> = match mut_owned {
16 Some(ref mut v) => Some(v),
21 use std::{error::Error, fmt, num::ParseIntError};
25 source: Option<ParseIntError>,
29 fn source(&self) -> Option<&(dyn Error + 'static)> {
31 Some(ref s) => Some(s),
37 impl fmt::Display for E {
38 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {