1
0
mirror of https://github.com/nushell/nushell.git synced 2025-03-28 16:46:18 +01:00
nushell/crates/nu-command
Ian Manske 56cdee1fd8
Refactor first and last ()
# 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
..
src Refactor first and last () 2024-04-13 14:58:54 +00:00
tests Refactor first and last () 2024-04-13 14:58:54 +00:00
Cargo.toml Bump version to 0.92.3 () 2024-04-12 08:00:43 -05:00
LICENSE Fix rest of license year ranges () 2023-04-04 09:03:29 +12:00