Int16SortedFromSlice creates a Int16Sorted from a slice.
(s []int16)
| 1983 | |
| 1984 | // Int16SortedFromSlice creates a Int16Sorted from a slice. |
| 1985 | func Int16SortedFromSlice(s []int16) Int16Sorted { |
| 1986 | if s == nil { |
| 1987 | return nil |
| 1988 | } |
| 1989 | dst := make(Int16Sorted, len(s)) |
| 1990 | for _, v := range s { |
| 1991 | dst[v] = struct{}{} |
| 1992 | } |
| 1993 | return dst |
| 1994 | } |
| 1995 | |
| 1996 | // Uint16 is a set of uint16s that will be stored as an array. |
| 1997 | // Elements are not sorted and the order of elements is not guaranteed. |
no outgoing calls
searching dependent graphs…