mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:55:59 +02:00
filesize conversion (#5770)
This commit is contained in:
@ -16,6 +16,8 @@ impl Value {
|
||||
pub fn as_i64(&self) -> Result<i64, ShellError> {
|
||||
match self {
|
||||
Value::Int { val, .. } => Ok(*val),
|
||||
Value::Filesize { val, .. } => Ok(*val),
|
||||
Value::Duration { val, .. } => Ok(*val),
|
||||
x => Err(ShellError::CantConvert(
|
||||
"i64".into(),
|
||||
x.get_type().to_string(),
|
||||
|
Reference in New Issue
Block a user