Fix deserializing SQL array with only one element

This commit is contained in:
2021-12-18 17:42:28 +01:00
parent a2b60d3f58
commit c71621b3d6
2 changed files with 22 additions and 42 deletions

View File

@@ -74,9 +74,6 @@ where
<T as FromStr>::Err: Into<Box<dyn std::error::Error + Send + Sync>>,
{
let mut raw_values: Vec<_> = raw.split(',').collect();
if raw_values[0] == raw {
raw_values.clear();
}
let mut values = Vec::new();
for r in raw_values.drain(..) {
values.push(r.parse().map_err(into_column_decode_err(index))?);