From 30fc9380a1c4eea1fe0f56a1053b51961b4cffc5 Mon Sep 17 00:00:00 2001 From: Michael Charlton Date: Sat, 22 Jul 2023 11:22:30 +0100 Subject: [PATCH] doc: use square brackets for generics in comments (#18943) --- vlib/arrays/arrays.v | 6 +++--- vlib/sync/pool/pool.v | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vlib/arrays/arrays.v b/vlib/arrays/arrays.v index 6fc84d8c2d..dfb5383664 100644 --- a/vlib/arrays/arrays.v +++ b/vlib/arrays/arrays.v @@ -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 @@ -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([[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 diff --git a/vlib/sync/pool/pool.v b/vlib/sync/pool/pool.v index 6c0797b486..b4f2718655 100644 --- a/vlib/sync/pool/pool.v +++ b/vlib/sync/pool/pool.v @@ -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(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.