From 3e792d2576275a26ef7eac6ce298ac40e8bcf86b Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Wed, 18 Dec 2024 16:35:10 +0100 Subject: [PATCH] Add TODO:s for calling unsafe slice functions --- .../build/re_types_builder/src/codegen/rust/deserializer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/build/re_types_builder/src/codegen/rust/deserializer.rs b/crates/build/re_types_builder/src/codegen/rust/deserializer.rs index 45fe4925e0f1..9208b5902f69 100644 --- a/crates/build/re_types_builder/src/codegen/rust/deserializer.rs +++ b/crates/build/re_types_builder/src/codegen/rust/deserializer.rs @@ -597,7 +597,7 @@ fn quote_arrow_field_deserializer( (start, end), #data_src_buf.len(), )); } - #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] // TODO: unsafe slice again + #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] // TODO(apache/arrow-rs#6900): slice_with_length_unchecked unsafe when https://github.com/apache/arrow-rs/pull/6901 is merged and released let data = #data_src_buf.slice_with_length(start, len); Ok(data) @@ -749,7 +749,7 @@ fn quote_arrow_field_deserializer( let quoted_inner_data_range = match inner_repr { InnerRepr::BufferT => { quote! { - #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] // TODO: unsafe + #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] // TODO(apache/arrow-rs#6900): unsafe slice_unchecked when https://github.com/apache/arrow-rs/pull/6901 is merged and released let data = #data_src_inner.clone().slice(start, end - start); let data = ::re_types_core::ArrowBuffer::from(data); }