@@ -457,7 +457,11 @@ fn map_arc_data_ocsp_response(
457457 // alive, but Rust doesn't understand the lifetime relationship it
458458 // produces. Open-coded implementation of the API discussed in
459459 // https://github.com/joshua-maros/ouroboros/issues/38
460- f ( inner_it. as_bytes ( py) , unsafe { std:: mem:: transmute ( value) } )
460+ f ( inner_it. as_bytes ( py) , unsafe {
461+ std:: mem:: transmute :: < & ocsp_resp:: OCSPResponse < ' _ > , & ocsp_resp:: OCSPResponse < ' _ > > (
462+ value,
463+ )
464+ } )
461465 } )
462466 } )
463467}
@@ -469,11 +473,18 @@ fn try_map_arc_data_mut_ocsp_response_iterator<E>(
469473 ) -> Result < ocsp_resp:: SingleResponse < ' this > , E > ,
470474) -> Result < OwnedSingleResponse , E > {
471475 OwnedSingleResponse :: try_new ( Arc :: clone ( it. borrow_owner ( ) ) , |inner_it| {
472- // SAFETY: This is safe because `Arc::clone` ensures the data is
473- // alive, but Rust doesn't understand the lifetime relationship it
474- // produces. Open-coded implementation of the API discussed in
475- // https://github.com/joshua-maros/ouroboros/issues/38
476- it. with_dependent_mut ( |_, value| f ( inner_it, unsafe { std:: mem:: transmute ( value) } ) )
476+ it. with_dependent_mut ( |_, value| {
477+ // SAFETY: This is safe because `Arc::clone` ensures the data is
478+ // alive, but Rust doesn't understand the lifetime relationship it
479+ // produces. Open-coded implementation of the API discussed in
480+ // https://github.com/joshua-maros/ouroboros/issues/38
481+ f ( inner_it, unsafe {
482+ std:: mem:: transmute :: <
483+ & mut asn1:: SequenceOf < ' _ , ocsp_resp:: SingleResponse < ' _ > > ,
484+ & mut asn1:: SequenceOf < ' _ , ocsp_resp:: SingleResponse < ' _ > > ,
485+ > ( value)
486+ } )
487+ } )
477488 } )
478489}
479490
0 commit comments