mirror of
https://github.com/nushell/nushell.git
synced 2025-08-13 20:17:14 +02:00
# Description @sholderbach left a very helpful review and this just implements the suggestions he made. Didn't notice any difference in performance, but there could potentially be for a long running Nushell session or one that loads a lot of stuff. I also caught a bug where nu-protocol won't build without `plugin` because of the previous conditional import. Oops. Fixed. # User-Facing Changes `blocks` and `modules` type in `EngineState` changed again. Shouldn't affect plugins or anything else though really # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting --------- Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
This commit is contained in:
@ -91,6 +91,8 @@ fn eval_source2(
|
||||
// So we LITERALLY ignore all expressions except the LAST.
|
||||
if block.len() > 1 {
|
||||
let range = ..block.pipelines.len() - 1;
|
||||
// Note: `make_mut` will mutate `&mut block: &mut Arc<Block>`
|
||||
// for the outer fn scope `eval_block`
|
||||
Arc::make_mut(&mut block).pipelines.drain(range);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user