-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Deref<Target=[T]> for AutoArray and AutoPrimitiveArray
This makes it possible to read and write the elements of a Java array without resorting to unsafe code. Both AutoArray and AutoPrimitiveArray now need to be constructed with a known array length (::new() will query the length and an unsafe ::new_with_len() API could be used in case the length was already known) The `.size()` API has been replace with `.len()` and `.is_empty()` and `.len()` doesn't return a Result since it's no longer possible to create an `Auto[Primitive]Array` without a known length.
- Loading branch information
Showing
4 changed files
with
140 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters