AsSlice returns the set as a slice.
()
| 323 | |
| 324 | // AsSlice returns the set as a slice. |
| 325 | func (s Int) AsSlice() []int { |
| 326 | if s == nil { |
| 327 | return nil |
| 328 | } |
| 329 | dst := make([]int, 0, len(s)) |
| 330 | for k := range s { |
| 331 | dst = append(dst, k) |
| 332 | } |
| 333 | return dst |
| 334 | } |
| 335 | |
| 336 | // DecodeMsg decodes the message from the reader. |
| 337 | func (s *Int) DecodeMsg(reader *msgp.Reader) error { |
no outgoing calls