@@ -27,16 +27,17 @@ use crate::{
2727 err:: { nspr, Error , PR_SetError , Res } ,
2828 null_safe_slice,
2929 p11:: hex_with_len,
30- prio, prtypes ,
30+ prio,
3131 selfencrypt:: hex,
32- ssl, PRInt32 , PRInt64 , PRIntn , PRUint16 , PRUint8 , SECStatus ,
32+ ssl:: { self , PRInt32 , PRInt64 , PRIntn , PRUint16 , PRUint8 } ,
33+ SECStatus ,
3334} ;
3435
3536// Alias common types.
3637type PrFd = * mut prio:: PRFileDesc ;
37- type PrStatus = prtypes :: PRStatus ;
38- const PR_SUCCESS : PrStatus = prtypes :: PR_SUCCESS ;
39- const PR_FAILURE : PrStatus = prtypes :: PR_FAILURE ;
38+ type PrStatus = prio :: PRStatus :: Type ;
39+ const PR_SUCCESS : PrStatus = prio :: PRStatus :: PR_SUCCESS ;
40+ const PR_FAILURE : PrStatus = prio :: PRStatus :: PR_FAILURE ;
4041
4142/// Convert a pinned, boxed object into a void pointer.
4243pub fn as_c_void < T : Unpin > ( pin : & mut Pin < Box < T > > ) -> * mut c_void {
@@ -352,16 +353,16 @@ unsafe extern "C" fn agent_getname(_fd: PrFd, addr: *mut prio::PRNetAddr) -> PrS
352353 return PR_FAILURE ;
353354 } ;
354355 // Cast is safe because prio::PR_AF_INET is 2
355- a. inet . as_mut ( ) . family = prio:: PR_AF_INET as PRUint16 ;
356- a. inet . as_mut ( ) . port = 0 ;
357- a. inet . as_mut ( ) . ip = 0 ;
356+ a. inet . family = prio:: PR_AF_INET as PRUint16 ;
357+ a. inet . port = 0 ;
358+ a. inet . ip = 0 ;
358359 PR_SUCCESS
359360}
360361
361362unsafe extern "C" fn agent_getsockopt ( _fd : PrFd , opt : * mut prio:: PRSocketOptionData ) -> PrStatus {
362363 if let Some ( o) = opt. as_mut ( ) {
363364 if o. option == prio:: PRSockOption_PR_SockOpt_Nonblocking {
364- * o. value . non_blocking . as_mut ( ) = 1 ;
365+ o. value . non_blocking = 1 ;
365366 return PR_SUCCESS ;
366367 }
367368 }
0 commit comments