forked from extern/nushell
Merge pull request #233 from nushell/remove_bad_fixmes
Remove bad fixmes
This commit is contained in:
commit
68b7aa9470
@ -23,12 +23,10 @@ impl FromValue for Spanned<i64> {
|
|||||||
span: *span,
|
span: *span,
|
||||||
}),
|
}),
|
||||||
Value::Filesize { val, span } => Ok(Spanned {
|
Value::Filesize { val, span } => Ok(Spanned {
|
||||||
// FIXME: error check that this fits
|
|
||||||
item: *val as i64,
|
item: *val as i64,
|
||||||
span: *span,
|
span: *span,
|
||||||
}),
|
}),
|
||||||
Value::Duration { val, span } => Ok(Spanned {
|
Value::Duration { val, span } => Ok(Spanned {
|
||||||
// FIXME: error check that this fits
|
|
||||||
item: *val as i64,
|
item: *val as i64,
|
||||||
span: *span,
|
span: *span,
|
||||||
}),
|
}),
|
||||||
@ -42,14 +40,8 @@ impl FromValue for i64 {
|
|||||||
fn from_value(v: &Value) -> Result<Self, ShellError> {
|
fn from_value(v: &Value) -> Result<Self, ShellError> {
|
||||||
match v {
|
match v {
|
||||||
Value::Int { val, .. } => Ok(*val),
|
Value::Int { val, .. } => Ok(*val),
|
||||||
Value::Filesize { val, .. } => Ok(
|
Value::Filesize { val, .. } => Ok(*val as i64),
|
||||||
// FIXME: error check that this fits
|
Value::Duration { val, .. } => Ok(*val as i64),
|
||||||
*val as i64,
|
|
||||||
),
|
|
||||||
Value::Duration { val, .. } => Ok(
|
|
||||||
// FIXME: error check that this fits
|
|
||||||
*val as i64,
|
|
||||||
),
|
|
||||||
|
|
||||||
v => Err(ShellError::CantConvert("integer".into(), v.span()?)),
|
v => Err(ShellError::CantConvert("integer".into(), v.span()?)),
|
||||||
}
|
}
|
||||||
@ -64,7 +56,6 @@ impl FromValue for Spanned<f64> {
|
|||||||
span: *span,
|
span: *span,
|
||||||
}),
|
}),
|
||||||
Value::Float { val, span } => Ok(Spanned {
|
Value::Float { val, span } => Ok(Spanned {
|
||||||
// FIXME: error check that this fits
|
|
||||||
item: *val,
|
item: *val,
|
||||||
span: *span,
|
span: *span,
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user