Update integers.rs
This commit is contained in:
parent
6e1623cd86
commit
174f354c9b
|
@ -111,28 +111,6 @@ impl ScalarType for u16 {
|
|||
}
|
||||
}
|
||||
|
||||
/// The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
||||
#[Scalar(internal, name = "Int")]
|
||||
impl ScalarType for u32 {
|
||||
fn parse(value: Value) -> InputValueResult<Self> {
|
||||
match value {
|
||||
Value::Int(n) => Ok(n as Self),
|
||||
_ => Err(InputValueError::ExpectedType(value)),
|
||||
}
|
||||
}
|
||||
|
||||
fn is_valid(value: &Value) -> bool {
|
||||
match value {
|
||||
Value::Int(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn to_value(&self) -> Value {
|
||||
Value::Int(*self as i32)
|
||||
}
|
||||
}
|
||||
|
||||
/// The `Int64` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^64) and 2^64 - 1.
|
||||
#[Scalar(internal, name = "Int64")]
|
||||
impl ScalarType for i64 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user