Rename 'bytes' to 'filesize' (#2153)

This commit is contained in:
Jonathan Turner
2020-07-10 19:17:37 -07:00
committed by GitHub
parent 1bb6a2d9ed
commit 0bc2e29f99
25 changed files with 78 additions and 76 deletions

View File

@ -347,7 +347,7 @@ pub async fn post(
pub fn value_to_json_value(v: &Value) -> Result<serde_json::Value, ShellError> {
Ok(match &v.value {
UntaggedValue::Primitive(Primitive::Boolean(b)) => serde_json::Value::Bool(*b),
UntaggedValue::Primitive(Primitive::Bytes(b)) => serde_json::Value::Number(
UntaggedValue::Primitive(Primitive::Filesize(b)) => serde_json::Value::Number(
serde_json::Number::from(b.to_u64().expect("What about really big numbers")),
),
UntaggedValue::Primitive(Primitive::Duration(i)) => {