@@ -216,7 +216,7 @@ pub enum NativeThreadState {
216216pub struct NativeActivityState {
217217 pub msg_read : libc:: c_int ,
218218 pub msg_write : libc:: c_int ,
219- pub config : super :: ConfigurationRef ,
219+ pub config : ConfigurationRef ,
220220 pub saved_state : Vec < u8 > ,
221221 pub input_queue : * mut ndk_sys:: AInputQueue ,
222222 pub window : Option < NativeWindow > ,
@@ -343,9 +343,8 @@ impl WaitableNativeActivityState {
343343 }
344344 }
345345
346- let saved_state = unsafe {
347- std:: slice:: from_raw_parts ( saved_state_in as * const u8 , saved_state_size as _ )
348- } ;
346+ let saved_state =
347+ unsafe { std:: slice:: from_raw_parts ( saved_state_in as * const u8 , saved_state_size) } ;
349348
350349 let config = unsafe {
351350 let config = ndk_sys:: AConfiguration_new ( ) ;
@@ -517,7 +516,7 @@ impl WaitableNativeActivityState {
517516 // given via a `malloc()` allocated pointer since it will automatically
518517 // `free()` the state after it has been converted to a buffer for the JVM.
519518 if !guard. saved_state . is_empty ( ) {
520- let saved_state_size = guard. saved_state . len ( ) as _ ;
519+ let saved_state_size = guard. saved_state . len ( ) ;
521520 let saved_state_src_ptr = guard. saved_state . as_ptr ( ) ;
522521 unsafe {
523522 let saved_state = libc:: malloc ( saved_state_size) ;
@@ -681,15 +680,15 @@ unsafe extern "C" fn on_resume(activity: *mut ndk_sys::ANativeActivity) {
681680
682681unsafe extern "C" fn on_save_instance_state (
683682 activity : * mut ndk_sys:: ANativeActivity ,
684- out_len : * mut ndk_sys :: size_t ,
683+ out_len : * mut usize ,
685684) -> * mut libc:: c_void {
686685 abort_on_panic ( || {
687686 log:: debug!( "SaveInstanceState: {:p}\n " , activity) ;
688687 * out_len = 0 ;
689688 let mut ret = ptr:: null_mut ( ) ;
690689 try_with_waitable_activity_ref ( activity, |waitable_activity| {
691690 let ( state, len) = waitable_activity. request_save_state ( ) ;
692- * out_len = len as ndk_sys :: size_t ;
691+ * out_len = len;
693692 ret = state
694693 } ) ;
695694
0 commit comments