Codebase list golang-github-beorn7-perks / 2b8b02e
remove garbage var Blake Mizerany 10 years ago
1 changed file(s) with 3 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
3636 }
3737
3838 func (bs *Bins) remove(n int) *Bin {
39 a := *bs
40 if n < 0 || len(a) < n {
39 if n < 0 || len(*bs) < n {
4140 return nil
4241 }
43 x := a[n]
44 *bs = append(a[:n], a[n+1:]...)
42 x := (*bs)[n]
43 *bs = append((*bs)[:n], (*bs)[n+1:]...)
4544 return x
4645 }
4746