-
Notifications
You must be signed in to change notification settings - Fork 430
Open
Description
Issue corresponding to a PR #1779. (Relevant tests are included in the PR)
In the current version, newtype fields aren't able to be deserialized as seen below.
#[cfg(feature = "serde")]
#[tokio::test]
async fn deserialize_row() {
// ... ommitted
#[derive(Deserialize, Debug)]
struct Data {
id: i64,
name: String,
score: f64,
data: Vec<u8>,
age: Option<i64>,
none: Option<()>,
status: Status,
wrapper: Wrapper,
newtype: NewType,
}
#[derive(Deserialize, Debug, PartialEq)]
struct NewType(String);
// ... ommitted
let data: Data = libsql::de::from_row(&row).unwrap();
// ... ommitted
// Fails !!!
assert_eq!(data.newtype, NewType("Newtype".to_string()));
}
Metadata
Metadata
Assignees
Labels
No labels