nushell/crates/nu-command
Andrew Barnes 319930a1b9
Add streaming support to save for ExternalStream data (#4985)
* Add streaming support to save for ExternalStream data

Prior to this change, save would collect data from an ExternalStream (data
originating from externals) consuming memory for the full amount of data piped
to it,

This change adds streaming support for ExternalStream allowing saving of
arbitrarily large files and bounding memory usage.

* Remove broken save test

This test passes but not for the right reasons, since this test was
written filename has become a required parameter.  The parser outputs
an error but the test still passes as is checking the original un-mutated
file assuming save has re-written the contents.

This change removes the test.

```
running 1 test
=== stderr
Error: nu::parser::missing_positional (https://docs.rs/nu-parser/0.60.0/nu-parser/enum.ParseError.html#variant.MissingPositional)

  × Missing required positional argument.
   ╭─[source:1:1]
 1 │ open save_test_1/cargo_sample.toml | save
   ·                                          ▲
   ·                                          ╰── missing filename
   ╰────
  help: Usage: save {flags} <filename>

test commands::save::figures_out_intelligently_where_to_write_out_with_metadata ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 515 filtered out; finished in 0.10s
```
2022-03-27 15:39:27 +13:00
..
assets Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
src Add streaming support to save for ExternalStream data (#4985) 2022-03-27 15:39:27 +13:00
tests Add streaming support to save for ExternalStream data (#4985) 2022-03-27 15:39:27 +13:00
build.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
Cargo.toml Termux/Android target support for v0.60.0 (#4956) 2022-03-27 07:21:19 +13:00