Remove as_i64 and as_f64 (#14258)

# Description
Turns out there are duplicate conversion functions: `as_i64` and
`as_f64`. In most cases, these can be replaced with `as_int` and
`as_float`, respectively.
This commit is contained in:
Ian Manske
2024-11-05 00:28:56 -08:00
committed by GitHub
parent 1e051e573d
commit e87a35104a
9 changed files with 33 additions and 61 deletions

View File

@@ -259,7 +259,7 @@ fn action(input: &Value, args: &Arguments, span: Span) -> Value {
if radix == 10 {
*val as i64
} else {
match convert_int(&Value::int(*val as i64, span), span, radix).as_i64() {
match convert_int(&Value::int(*val as i64, span), span, radix).as_int() {
Ok(v) => v,
_ => {
return Value::error(