()
| 59 | |
| 60 | #[test] |
| 61 | fn downcast_mut_second_root() { |
| 62 | let mut report = create_report().expand(); |
| 63 | report.push(create_report().attach_opaque(AttachmentA(10))); |
| 64 | |
| 65 | let attachment = report |
| 66 | .downcast_mut::<AttachmentA>() |
| 67 | .expect("Attachment not found"); |
| 68 | attachment.0 += 10; |
| 69 | |
| 70 | let attachment = report |
| 71 | .downcast_ref::<AttachmentA>() |
| 72 | .expect("Attachment not found"); |
| 73 | assert_eq!(attachment.0, 20); |
| 74 | } |
| 75 | |
| 76 | #[test] |
| 77 | fn downcast_mut_returns_outermost() { |
nothing calls this directly
no test coverage detected