()
| 2481 | |
| 2482 | #[test] |
| 2483 | fn box_map_elements_panic() { |
| 2484 | use std::panic::{AssertUnwindSafe, catch_unwind}; |
| 2485 | let boxed = Box::new(TestTreeNode::new_leaf(42i32)); |
| 2486 | let result = catch_unwind(AssertUnwindSafe(|| { |
| 2487 | boxed |
| 2488 | .map_elements(|_: TestTreeNode<i32>| -> Result<_> { |
| 2489 | panic!("simulated panic during rewrite") |
| 2490 | }) |
| 2491 | .ok() |
| 2492 | })); |
| 2493 | assert!(result.is_err()); |
| 2494 | } |
| 2495 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…