Skip to content

Commit

Permalink
fix: Convert integral values to String before converting to Value
Browse files Browse the repository at this point in the history
Closes #1055
  • Loading branch information
Ethan Donowitz committed Apr 28, 2021
1 parent 34fe585 commit c5da264
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/db/spanner/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down

0 comments on commit c5da264

Please sign in to comment.