forked from nim-lang/Nim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
toOpenArray[T](ptr UncheckedArray[T])
for clarity. (nim-lang#9316)
* Add `toOpenArray[T](ptr UncheckedArray[T])` for clarity. `ptr array[0,T]` for some unchecked type already works but A) `UncheckedArray` seems to be the intended future way for this kind of access, and B) essentially all use cases will have a `ptr` for that kind of array source and this call signature lets callers drop the trailing `[]` corresponding to that `ptr` deref. This PR relates to issue https://github.com/nim-lang/Nim/issues/9001 . * Add a test for toOpenArray() for UncheckedArray[T]s.
- Loading branch information
Showing
3 changed files
with
8 additions
and
1 deletion.
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