File tree 1 file changed +2
-2
lines changed
arrow-integration-testing/src
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ fn cdata_integration_import_schema_and_compare_to_json(
205
205
let json_schema = read_json_file_metadata ( json_name. to_str ( ) ?) ?. schema ;
206
206
207
207
// The source ArrowSchema will be released when this is dropped
208
- let imported_schema = unsafe { std :: ptr :: replace ( c_schema , FFI_ArrowSchema :: empty ( ) ) } ;
208
+ let imported_schema = unsafe { FFI_ArrowSchema :: from_raw ( c_schema ) } ;
209
209
let imported_schema = Schema :: try_from ( & imported_schema) ?;
210
210
211
211
// compare schemas
@@ -244,7 +244,7 @@ fn cdata_integration_import_batch_and_compare_to_json(
244
244
read_single_batch_from_json_file ( json_name. to_str ( ) ?, batch_num. try_into ( ) . unwrap ( ) ) ?;
245
245
let schema = json_batch. schema ( ) ;
246
246
247
- let imported_array = unsafe { std :: ptr :: replace ( c_array , FFI_ArrowArray :: empty ( ) ) } ;
247
+ let imported_array = unsafe { FFI_ArrowArray :: from_raw ( c_array ) } ;
248
248
let imported_array =
249
249
from_ffi_and_data_type ( imported_array, DataType :: Struct ( schema. fields . clone ( ) ) ) ?;
250
250
imported_array. validate_full ( ) ?;
You can’t perform that action at this time.
0 commit comments