File tree Expand file tree Collapse file tree
examples/return-string-from-managed Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,7 +73,6 @@ fn print_string_from_csharp_using_unmanaged_alloc(delegate_loader: &AssemblyDele
7373 . unwrap ( ) ;
7474 FREE_H_GLOBAL
7575 . set ( free_h_global)
76- . ok ( )
7776 . expect ( "string interop already init" ) ;
7877
7978 // actual usage
@@ -132,7 +131,6 @@ fn print_string_from_csharp_using_gc_handle(delegate_loader: &AssemblyDelegateLo
132131 . unwrap ( ) ;
133132 FREE_GC_HANDLE_STRING
134133 . set ( free_gc_handle_string)
135- . ok ( )
136134 . expect ( "string interop already init" ) ;
137135
138136 let get_string_data_offset = delegate_loader
@@ -173,7 +171,7 @@ impl GcHandleString {
173171 let unmarked_ptr = ( self . 0 as usize & !1usize ) as * const * const u16 ;
174172 let string_ptr = unsafe { * unmarked_ptr } ;
175173 let string_data_offset = * STRING_DATA_OFFSET . get ( ) . expect ( "string interop not init" ) ;
176- return unsafe { string_ptr. byte_add ( string_data_offset) } . cast :: < u16 > ( ) ;
174+ unsafe { string_ptr. byte_add ( string_data_offset) } . cast :: < u16 > ( )
177175 }
178176 pub fn len ( & self ) -> usize {
179177 // read the length of the string which is stored in front of the data.
You can’t perform that action at this time.
0 commit comments