Skip to content

Commit

Permalink
doc: use square brackets for generics in comments (#18943)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-charlton committed Jul 22, 2023
1 parent dcbc9e0 commit 30fc938
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions vlib/arrays/arrays.v
Expand Up @@ -3,8 +3,8 @@ module arrays
import strings

// Common arrays functions:
// - min / max - return the value of the minumum / maximum
// - idx_min / idx_max - return the index of the first minumum / maximum
// - min / max - return the value of the minimum / maximum
// - idx_min / idx_max - return the index of the first minimum / maximum
// - merge - combine two sorted arrays and maintain sorted order
// - chunk - chunk array to arrays with n elements
// - window - get snapshots of the window of the given size sliding along array with the given step, where each snapshot is an array
Expand Down Expand Up @@ -312,7 +312,7 @@ pub fn fold_indexed[T, R](array []T, init R, fold_op fn (idx int, acc R, elem T)
}

// flatten flattens n + 1 dimensional array into n dimensional array
// Example: arrays.flatten<int>([[1, 2, 3], [4, 5]]) // => [1, 2, 3, 4, 5]
// Example: arrays.flatten[int]([[1, 2, 3], [4, 5]]) // => [1, 2, 3, 4, 5]
pub fn flatten[T](array [][]T) []T {
// calculate required capacity
mut required_size := 0
Expand Down
2 changes: 1 addition & 1 deletion vlib/sync/pool/pool.v
Expand Up @@ -37,7 +37,7 @@ pub struct PoolProcessorConfig {
// thread in the pool will run for each item.
// The callback function will receive as parameters:
// 1) the PoolProcessor instance, so it can call
// p.get_item<int>(idx) to get the actual item at index idx
// p.get_item[int](idx) to get the actual item at index idx
// 2) idx - the index of the currently processed item
// 3) task_id - the index of the worker thread in which the callback
// function is running.
Expand Down

0 comments on commit 30fc938

Please sign in to comment.