mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: replace generic '<>' with '[]' in error messages and comments (#16571)
This commit is contained in:
@ -7,7 +7,7 @@ mut:
|
||||
prev &DoublyListNode[T] = unsafe { 0 }
|
||||
}
|
||||
|
||||
// DoublyLinkedList<T> represents a generic doubly linked list of elements, each of type T.
|
||||
// DoublyLinkedList[T] represents a generic doubly linked list of elements, each of type T.
|
||||
pub struct DoublyLinkedList[T] {
|
||||
mut:
|
||||
head &DoublyListNode[T] = unsafe { 0 }
|
||||
@ -298,7 +298,7 @@ pub fn (mut list DoublyLinkedList[T]) back_iterator() DoublyListIterBack[T] {
|
||||
}
|
||||
}
|
||||
|
||||
// DoublyListIter<T> is an iterator for DoublyLinkedList.
|
||||
// DoublyListIter[T] is an iterator for DoublyLinkedList.
|
||||
// It starts from *the start* and moves forwards to *the end* of the list.
|
||||
// It can be used with V's `for x in iter {` construct.
|
||||
// One list can have multiple independent iterators, pointing to different positions/places in the list.
|
||||
@ -319,7 +319,7 @@ pub fn (mut iter DoublyListIter[T]) next() ?T {
|
||||
return res
|
||||
}
|
||||
|
||||
// DoublyListIterBack<T> is an iterator for DoublyLinkedList.
|
||||
// DoublyListIterBack[T] is an iterator for DoublyLinkedList.
|
||||
// It starts from *the end* and moves backwards to *the start* of the list.
|
||||
// It can be used with V's `for x in iter {` construct.
|
||||
// One list can have multiple independent iterators, pointing to different positions/places in the list.
|
||||
|
@ -192,7 +192,7 @@ pub fn (mut list LinkedList[T]) iterator() ListIter[T] {
|
||||
}
|
||||
}
|
||||
|
||||
// ListIter<T> is an iterator for LinkedList.
|
||||
// ListIter[T] is an iterator for LinkedList.
|
||||
// It can be used with V's `for x in iter {` construct.
|
||||
// One list can have multiple independent iterators, pointing to different positions/places in the list.
|
||||
// An iterator instance always traverses the list from start to finish.
|
||||
|
@ -47,7 +47,7 @@ pub fn (mut set Set[T]) clear() {
|
||||
}
|
||||
|
||||
// equal checks whether the two given sets are equal (i.e. contain all and only the same elements).
|
||||
[deprecated: 'use set1<T> == set2<T> instead']
|
||||
[deprecated: 'use set1[T] == set2[T] instead']
|
||||
pub fn (l Set[T]) equal(r Set[T]) bool {
|
||||
return l == r
|
||||
}
|
||||
@ -115,7 +115,7 @@ pub fn (l Set[T]) intersection(r Set[T]) Set[T] {
|
||||
}
|
||||
|
||||
// difference returns the difference of sets.
|
||||
[deprecated: 'use set1<T> - set2<T> instead']
|
||||
[deprecated: 'use set1[T] - set2[T] instead']
|
||||
pub fn (l Set[T]) difference(r Set[T]) Set[T] {
|
||||
return l - r
|
||||
}
|
||||
|
Reference in New Issue
Block a user