Ian Manske 56cdee1fd8
Refactor first and last (#12478)
# Description

- Refactors `first` and `last` using `Vec::truncate` and `Vec::drain`.
- `std::mem::take` was also used to eliminate a few `Value` clones.
- The `NeedsPositiveValue` error now uses the span of the `rows`
argument instead of the call head span.
- `last` now errors on an empty stream to match `first` which does
error.
-  Made metadata preservation more consistent.

# User-Facing Changes
Breaking change: `last` now errors on an empty stream to match `first`
which does error.
2024-04-13 14:58:54 +00:00
..
2022-11-22 16:58:11 -08:00
2023-11-16 15:14:45 -06:00
2023-10-24 12:48:05 -05:00
2024-01-25 14:16:49 +08:00
2024-04-13 14:58:54 +00:00
2024-04-10 06:27:46 +08:00
2023-11-03 10:09:33 -05:00
2024-04-13 14:58:54 +00:00
2023-10-19 09:30:34 -05:00
2023-10-10 03:31:15 +13:00
2024-04-13 14:58:54 +00:00
2024-03-14 15:51:55 -05:00
2023-11-17 19:30:53 -06:00
2024-03-09 18:58:02 +02:00
2023-09-16 21:49:10 +02:00
2023-03-15 18:54:55 +13:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2024-02-17 10:51:20 +02:00
2023-04-28 13:25:44 +02:00
2024-03-11 19:46:04 +01:00
2023-04-28 13:25:44 +02:00
2024-03-11 19:46:04 +01:00