()
| 766 | |
| 767 | #[test] |
| 768 | fn and_then() { |
| 769 | assert!(NONE.and_then(|_| NONE).is_none().to_bool()); |
| 770 | assert!(NONE.and_then(|_| SOME).is_none().to_bool()); |
| 771 | |
| 772 | let ret = SOME.and_then(|value| { |
| 773 | assert_eq!(VALUE, value); |
| 774 | OTHER |
| 775 | }); |
| 776 | assert!(ret.ct_eq(&OTHER).to_bool()); |
| 777 | } |
| 778 | |
| 779 | #[test] |
| 780 | fn filter() { |