1
0
mirror of https://github.com/golang/go synced 2024-11-19 02:14:43 -07:00
go/src/slices
Brad Fitzpatrick b581e44739 slices: simplify Clone a bit
No need for an explicit nil check. Slicing the input slice
down to zero capacity also preserves nil.

Change-Id: I1f53cc485373d0e65971cd87b6243650ac72612c
Reviewed-on: https://go-review.googlesource.com/c/go/+/521037
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-08-20 04:12:09 +00:00
..
example_test.go slices, maps: add examples; doc comment fixes 2023-06-29 15:34:32 +00:00
slices_test.go slices: add Concat 2023-08-08 14:31:39 +00:00
slices.go slices: simplify Clone a bit 2023-08-20 04:12:09 +00:00
sort_benchmark_test.go sort: forward fixed-type slice sorting to slices package 2023-07-21 13:00:18 +00:00
sort_test.go sort: forward fixed-type slice sorting to slices package 2023-07-21 13:00:18 +00:00
sort.go sort: add gen_sort_variants support for x/exp/slices 2023-07-25 01:33:04 +00:00
zsortanyfunc.go slices: add sorting and comparison functions 2023-05-23 23:33:29 +00:00
zsortordered.go slices: add sorting and comparison functions 2023-05-23 23:33:29 +00:00