mirror of
https://github.com/nushell/nushell.git
synced 2025-08-21 03:57:44 +02:00
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:
@@ -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(
|
||||
|
Reference in New Issue
Block a user