Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dxyinme committed Jan 22, 2024
1 parent 22c743a commit 319745e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions list/array_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ func (a *ArrayList[T]) Append(ts ...T) error {
// Add 在ArrayList下标为index的位置插入一个元素
// 当index等于ArrayList长度等同于append
func (a *ArrayList[T]) Add(index int, t T) (err error) {
if a.vals, err = slice.Add(a.vals, t, index); err != nil {
return
}
return nil
a.vals, err = slice.Add(a.vals, t, index)
return
}

// Set 设置ArrayList里index位置的值为t
Expand Down

0 comments on commit 319745e

Please sign in to comment.