From ca7ff37697e987ff648225a770482a966cb2e678 Mon Sep 17 00:00:00 2001 From: Michael Angerman Date: Tue, 26 Oct 2021 13:06:26 -0700 Subject: [PATCH] add in dbg info so I can see what is being matched on --- crates/nu-command/src/filters/last.rs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/crates/nu-command/src/filters/last.rs b/crates/nu-command/src/filters/last.rs index f9ed664feb..75ffd6fec1 100644 --- a/crates/nu-command/src/filters/last.rs +++ b/crates/nu-command/src/filters/last.rs @@ -57,13 +57,19 @@ impl Command for Last { let beginning_rows_to_skip = 2; match input { - PipelineData::Stream(stream) => Ok(stream - .skip(beginning_rows_to_skip.try_into().unwrap()) - .into_pipeline_data()), - PipelineData::Value(Value::List { vals, .. }) => Ok(vals - .into_iter() - .skip(beginning_rows_to_skip.try_into().unwrap()) - .into_pipeline_data()), + PipelineData::Stream(stream) => { + dbg!("Stream"); + Ok(stream + .skip(beginning_rows_to_skip.try_into().unwrap()) + .into_pipeline_data()) + } + PipelineData::Value(Value::List { vals, .. }) => { + dbg!("Value"); + Ok(vals + .into_iter() + .skip(beginning_rows_to_skip.try_into().unwrap()) + .into_pipeline_data()) + } _ => { dbg!("Fall to the bottom"); Ok(PipelineData::Value(Value::Nothing { span: call.head }))