Skip to content

Commit 80b71cd

Browse files
committed
Use ptr::write
1 parent 55af164 commit 80b71cd

File tree

1 file changed

+2
-2
lines changed
  • arrow-integration-testing/src

1 file changed

+2
-2
lines changed

arrow-integration-testing/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ fn cdata_integration_export_schema_from_json(
179179
let f = read_json_file_metadata(json_name.to_str()?)?;
180180
let c_schema = FFI_ArrowSchema::try_from(&f.schema)?;
181181
// Move exported schema into output struct
182-
unsafe { ptr::replace(out, c_schema) };
182+
unsafe { ptr::write(out, c_schema) };
183183
Ok(())
184184
}
185185

@@ -193,7 +193,7 @@ fn cdata_integration_export_batch_from_json(
193193
let a = StructArray::from(b).into_data();
194194
let c_array = FFI_ArrowArray::new(&a);
195195
// Move exported array into output struct
196-
unsafe { ptr::replace(out, c_array) };
196+
unsafe { ptr::write(out, c_array) };
197197
Ok(())
198198
}
199199

0 commit comments

Comments
 (0)