style usages part one (openarray => openArray) (#19321)
* style usages (openArray) * revert doc changes
This commit is contained in:
parent
1869826668
commit
9df195ef58
49 changed files with 76 additions and 76 deletions
|
|
@ -15,7 +15,7 @@ but expression 'nesting + 1' is of type: int
|
|||
# line 15
|
||||
func default(T: typedesc[array]): T = discard
|
||||
doAssert default(array[3, int]) == [0, 0, 0]
|
||||
func shapeBad*[T: not char](s: openarray[T], rank: static[int], nesting = 0, parent_shape = default(array[rank, int])): array[rank, int] =
|
||||
func shapeBad*[T: not char](s: openArray[T], rank: static[int], nesting = 0, parent_shape = default(array[rank, int])): array[rank, int] =
|
||||
result = parent_shape
|
||||
result[nesting] = s.len
|
||||
when (T is seq|array):
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ proc acc(x: var Foo): var ref Bar =
|
|||
|
||||
proc test(maybeFoo: var Foo,
|
||||
maybeSeq: var seq[ref Bar],
|
||||
bars: var openarray[ref Bar],
|
||||
bars: var openArray[ref Bar],
|
||||
maybeTup: var Tup) =
|
||||
var bb: ref Bar
|
||||
maybeFoo.rmaybe = bb
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ proc initTable*[A, B](initialSize=64): TTable[A, B] =
|
|||
result.counter = 0
|
||||
newSeq(result.data, initialSize)
|
||||
|
||||
proc toTable*[A, B](pairs: openarray[tuple[key: A,
|
||||
proc toTable*[A, B](pairs: openArray[tuple[key: A,
|
||||
val: B]]): TTable[A, B] =
|
||||
## creates a new hash table that contains the given `pairs`.
|
||||
result = initTable[A, B](nextPowerOfTwo(pairs.len+10))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue