We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9845651 commit 9014290Copy full SHA for 9014290
1 file changed
bql/table/table.go
@@ -294,13 +294,10 @@ func (t *Table) DotProduct(t2 *Table) error {
294
295
// DeleteRow removes the row at position i from the table.
296
func (t *Table) DeleteRow(i int) error {
297
- td := make([]Row, len(t.data)-1, len(t.data)-1) // Preallocate resulting table.
298
if i < 0 || i >= len(t.data) {
299
return fmt.Errorf("cannot delete row %d from a table with %d rows", i, len(t.data))
300
}
301
- copy(td, t.data[:i])
302
- copy(td[i:], t.data[i+1:])
303
- t.data = td
+ t.data = append(t.data[:i], t.data[i+1:]...)
304
return nil
305
306
0 commit comments