d3drm: Move some unsafe_impl_from_* call to where variables are declared.