diff options
Diffstat (limited to 'library/src')
| -rw-r--r-- | library/src/compute/construct.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/src/compute/construct.rs b/library/src/compute/construct.rs index d39b69dd..74e96b5d 100644 --- a/library/src/compute/construct.rs +++ b/library/src/compute/construct.rs @@ -38,7 +38,7 @@ cast_from_value! { v: bool => Self(v as i64), v: i64 => Self(v), v: f64 => Self(v as i64), - v: EcoString => Self(v.parse().map_err(|_| "not a valid integer")?), + v: EcoString => Self(v.parse().map_err(|_| eco_format!("invalid integer: {}", v))?), } /// Convert a value to a float. @@ -79,7 +79,7 @@ cast_from_value! { v: i64 => Self(v as f64), v: f64 => Self(v), v: Ratio => Self(v.get()), - v: EcoString => Self(v.parse().map_err(|_| "not a valid float")?), + v: EcoString => Self(v.parse().map_err(|_| eco_format!("invalid float: {}", v))?), } /// Create a grayscale color. |
