From c5da264a37196f85b116df9a66c681c0b65a2dc2 Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Wed, 28 Apr 2021 19:34:19 +0000 Subject: [PATCH] fix: Convert integral values to String before converting to Value Closes #1055 --- src/db/spanner/support.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/db/spanner/support.rs b/src/db/spanner/support.rs index 2cceff96f3..c74b225734 100644 --- a/src/db/spanner/support.rs +++ b/src/db/spanner/support.rs @@ -40,17 +40,13 @@ impl ToSpannerValue for String { impl ToSpannerValue for i32 { fn to_spanner_value(&self) -> Value { - let mut value = Value::new(); - value.set_number_value(*self as f64); - value + self.to_string().to_spanner_value() } } impl ToSpannerValue for u32 { fn to_spanner_value(&self) -> Value { - let mut value = Value::new(); - value.set_number_value(*self as f64); - value + self.to_string().to_spanner_value() } }