Fix stupid bug in Sets.Delete()

This commit is contained in:
Bryan Boreham
2017-10-15 17:18:28 +00:00
parent 9353bd8f60
commit a39606896f

View File

@@ -67,7 +67,7 @@ func (s Sets) Delete(key string) Sets {
return s // not found
}
result := make([]stringSetEntry, len(s.entries)-1)
copy(result, s.entries[:i-1])
copy(result, s.entries[:i])
copy(result[i:], s.entries[i+1:])
return Sets{entries: result}
}