Skip to content

Commit 90c92c2

Browse files
committed
feat(types): add default derive to json wrapper
Adds a Default impl for `Json<T> where T: Default` allowing for other structs to use the wrapper and implement Default.
1 parent bbc0414 commit 90c92c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

postgres-types/src/serde_json_1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::fmt::Debug;
77
use std::io::Read;
88

99
/// A wrapper type to allow arbitrary `Serialize`/`Deserialize` types to convert to Postgres JSON values.
10-
#[derive(Clone, Debug, PartialEq, Eq)]
10+
#[derive(Clone, Default, Debug, PartialEq, Eq)]
1111
pub struct Json<T>(pub T);
1212

1313
impl<'a, T> FromSql<'a> for Json<T>

0 commit comments

Comments
 (0)