From 0d7b10fd0bd95d8e91d04edcc89d43951b0a5ce4 Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 14 Oct 2021 17:43:49 +1300 Subject: [PATCH] Remove bad fixmes --- crates/nu-engine/src/from_value.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/crates/nu-engine/src/from_value.rs b/crates/nu-engine/src/from_value.rs index 5dc0b517f3..b86e96bc83 100644 --- a/crates/nu-engine/src/from_value.rs +++ b/crates/nu-engine/src/from_value.rs @@ -23,12 +23,10 @@ impl FromValue for Spanned { span: *span, }), Value::Filesize { val, span } => Ok(Spanned { - // FIXME: error check that this fits item: *val as i64, span: *span, }), Value::Duration { val, span } => Ok(Spanned { - // FIXME: error check that this fits item: *val as i64, span: *span, }), @@ -42,14 +40,8 @@ impl FromValue for i64 { fn from_value(v: &Value) -> Result { match v { Value::Int { val, .. } => Ok(*val), - Value::Filesize { val, .. } => Ok( - // FIXME: error check that this fits - *val as i64, - ), - Value::Duration { val, .. } => Ok( - // FIXME: error check that this fits - *val as i64, - ), + Value::Filesize { val, .. } => Ok(*val as i64), + Value::Duration { val, .. } => Ok(*val as i64), v => Err(ShellError::CantConvert("integer".into(), v.span()?)), } @@ -64,7 +56,6 @@ impl FromValue for Spanned { span: *span, }), Value::Float { val, span } => Ok(Spanned { - // FIXME: error check that this fits item: *val, span: *span, }),