Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn foo<T>(o: &mut Option<T>) {
- let _ = o.filter(|_| true);
- }
- fn main() {
- let x = &mut Some(1);
- foo(x);
- assert!(x.is_none());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement