mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:25:55 +02:00
Allow math avg
to work on durations (#2529)
* Allow `math avg` to work on durations * formatting * fix linting issue and implemented `math sum` for duration * fix linting issue * applied requested changes * applied requested change for avg.rs * formatting
This commit is contained in:
@ -83,6 +83,10 @@ impl UntaggedValue {
|
||||
matches!(self, UntaggedValue::Primitive(Primitive::Filesize(_)))
|
||||
}
|
||||
|
||||
pub fn is_duration(&self) -> bool {
|
||||
matches!(self, UntaggedValue::Primitive(Primitive::Duration(_)))
|
||||
}
|
||||
|
||||
/// Returns true if this value represents a table
|
||||
pub fn is_table(&self) -> bool {
|
||||
matches!(self, UntaggedValue::Table(_))
|
||||
|
Reference in New Issue
Block a user