mirror of
https://github.com/nushell/nushell
synced 2024-12-30 23:08:56 +00:00
65af572761
# Description Change the `ignore` command to use `drain()` instead of collecting a value. This saves memory usage when piping a lot of output to `ignore`. There's no reason to keep the output in memory if it's going to be discarded anyway. # User-Facing Changes Probably none # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib`
7 lines
207 B
Rust
7 lines
207 B
Rust
use nu_test_support::nu;
|
|
|
|
#[test]
|
|
fn ignore_still_causes_stream_to_be_consumed_fully() {
|
|
let result = nu!("[foo bar] | each { |val| print $val; $val } | ignore");
|
|
assert_eq!("foobar", result.out);
|
|
}
|