2 Checks for use of `Option<Option<_>>` in function signatures and type
6 `Option<_>` represents an optional value. `Option<Option<_>>`
7 represents an optional optional value which is logically the same thing as an optional
8 value but has an unneeded extra level of wrapping.
10 If you have a case where `Some(Some(_))`, `Some(None)` and `None` are distinct cases,
11 consider a custom `enum` instead, with clear names for each case.
15 fn get_data() -> Option<Option<u32>> {
24 Data(Vec<u8>), // Was Some(Some(Vec<u8>))
25 NotYetFetched, // Was Some(None)
29 fn get_data() -> Contents {