(&mut self)
| 118 | |
| 119 | impl Drop for BoxedDynError { |
| 120 | fn drop(&mut self) { |
| 121 | let ptr = self.inner.raw_copy(); |
| 122 | // Safety: We own the pointer and it is valid for reading/writing |
| 123 | // `DynError`s. |
| 124 | let inner = unsafe { ptr.as_ref() }; |
| 125 | let vtable = inner.vtable; |
| 126 | // Safety: The vtable is for this pointer's concrete type and the |
| 127 | // pointer is valid to deallocate because we are passing ownership in. |
| 128 | unsafe { |
| 129 | (vtable.drop_and_deallocate)(ptr); |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | impl BoxedDynError { |
nothing calls this directly
no test coverage detected