Skip to content

Commit 0bcd957

Browse files
committed
Box Array
1 parent 4bb262c commit 0bcd957

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/value.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ pub enum Value {
200200

201201
#[cfg(feature = "postgres-array")]
202202
#[cfg_attr(docsrs, doc(cfg(feature = "postgres-array")))]
203-
Array(ArrayType, Option<Vec<Value>>),
203+
Array(ArrayType, Option<Box<Vec<Value>>>),
204204

205205
#[cfg(feature = "postgres-vector")]
206206
#[cfg_attr(docsrs, doc(cfg(feature = "postgres-vector")))]
@@ -1045,7 +1045,7 @@ pub mod with_array {
10451045
fn from(x: Vec<T>) -> Value {
10461046
Value::Array(
10471047
T::array_type(),
1048-
Some(x.into_iter().map(|e| e.into()).collect()),
1048+
Some(Box::new(x.into_iter().map(|e| e.into()).collect())),
10491049
)
10501050
}
10511051
}
@@ -1690,7 +1690,9 @@ pub fn sea_value_to_json_value(value: &Value) -> Json {
16901690
#[cfg(feature = "with-uuid")]
16911691
Value::Uuid(Some(v)) => Json::String(v.to_string()),
16921692
#[cfg(feature = "postgres-array")]
1693-
Value::Array(_, Some(v)) => Json::Array(v.iter().map(sea_value_to_json_value).collect()),
1693+
Value::Array(_, Some(v)) => {
1694+
Json::Array(v.as_ref().iter().map(sea_value_to_json_value).collect())
1695+
}
16941696
#[cfg(feature = "postgres-vector")]
16951697
Value::Vector(Some(v)) => Json::Array(v.as_slice().iter().map(|&v| v.into()).collect()),
16961698
#[cfg(feature = "with-ipnetwork")]

0 commit comments

Comments
 (0)