Skip to content

Commit

Permalink
[misc] openarray -> openArray
Browse files Browse the repository at this point in the history
  • Loading branch information
Vindaar committed Apr 26, 2023
1 parent 4d1d8c7 commit 5565a44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flambeau/raw/sugar/rawinterop.nim
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Metadata* = DynamicStackArray[int64]
template asNimView*[T](ar: ArrayRef[T]): openArray[T] =
toOpenArray(ar.data.unsafeAddr, 0, ar.size.int - 1)

template asTorchView*[T](oa: openarray[T]): ArrayRef[T] =
template asTorchView*[T](oa: openArray[T]): ArrayRef[T] =
# Don't remove. This makes @[1, 2, 3].asTorchView works
let a = @oa
ArrayRef[T].init(a[0].unsafeAddr, a.len)
Expand Down

0 comments on commit 5565a44

Please sign in to comment.