mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 11:55:55 +02:00
Pipeline sink refactor (#1359)
* Refactor pipeline ahead of block changes. Add '-c' commandline option * Update pipelining an error value * Fmt * Clippy * Add stdin redirect for -c flag * Add stdin redirect for -c flag
This commit is contained in:
@ -102,7 +102,7 @@ impl Plugin for Average {
|
||||
}
|
||||
UntaggedValue::Primitive(Primitive::Bytes(bytes)) => {
|
||||
let avg = *bytes as f64 / self.count as f64;
|
||||
let primitive_value: UntaggedValue = Primitive::from(avg).into();
|
||||
let primitive_value: UntaggedValue = UntaggedValue::bytes(avg as u64);
|
||||
let tagged_value = primitive_value.into_value(inner.tag.clone());
|
||||
Ok(vec![ReturnSuccess::value(tagged_value)])
|
||||
}
|
||||
|
Reference in New Issue
Block a user