Closed satoren closed 1 month ago
The changes introduce new functionality across the Yex.Nif
, Yex.Array
, and NifArray
modules. A new function array_insert_list/4
is added to the Yex.Nif
module for inserting a list into an array at a specified index. The Yex.Array
module receives a new insert_list/3
function that utilizes the NIF function for batch insertions. Additionally, the NifArray
struct in the Rust source gains the array_insert_list
function, which performs the actual insertion operation in the underlying array.
File | Change Summary |
---|---|
lib/nif.ex | Added method def array_insert_list(_array, _cur_txn, _index, _values) to Yex.Nif module. |
lib/shared_type/array.ex | Added method def insert_list(t, integer(), list()) :: :ok to Yex.Array module; updated insert/3 documentation. |
native/yex/src/array.rs | Added function fn array_insert_list(env: Env<'_>, array: NifArray, current_transaction: Option<ResourceArc<TransactionResource>>, index: u32, values: Vec<NifAny>) -> NifResult<Atom> to NifArray struct. |
In the land of code where rabbits play,
New functions hop in, brightening the day.
With lists to insert and arrays to grow,
Our joyful NIFs put on quite a show!
So gather ‘round, let’s cheer and sing,
For changes like these make our hearts take wing! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
insert_list
function in theYex.Array
module.array_insert_list
in theYex.Nif
module for enhanced array operations.Documentation
insert/3
function to clarify its purpose and usage examples.