]> git.lizzy.rs Git - rust.git/blob - tests/ui/unwrap.rs
Fix type checks for `manual_str_repeat`
[rust.git] / tests / ui / unwrap.rs
1 #![warn(clippy::unwrap_used)]
2
3 fn unwrap_option() {
4     let opt = Some(0);
5     let _ = opt.unwrap();
6 }
7
8 fn unwrap_result() {
9     let res: Result<u8, ()> = Ok(0);
10     let _ = res.unwrap();
11 }
12
13 fn main() {
14     unwrap_option();
15     unwrap_result();
16 }