gregelenbaas / diesel-citext

Diesel support for citext extension
MIT License
11 stars 11 forks source link

deserialize CiString as plain type #3

Closed daddinuz closed 5 years ago

daddinuz commented 5 years ago

As in the title, adding #[serde(transparent)] would allow to Serialize and Deserialize CiString as it was a String type.

let j = json!("Foo");
let s: CiString = serde_json::from_value(j);
gregelenbaas commented 5 years ago

Thanks for this. Can you up the version number to 0.4.0 and put the change in changes.md? Once done I'll merge and release fix to crates.io

daddinuz commented 5 years ago

Hi @gregelenbaas, I made what you asked in the latest commit.

If you merge this I could also fix in a short time Clippy: Default impl is missing for CiString and also write some tests in separate PRs. Maybe you can release to crates.io after these changes in order to have only one version bump.

Let me know what you think about.

EDIT: you can find the changes and bug fixes on this branch.

gregelenbaas commented 5 years ago

Sure, I'll merge in this change now and wait a week for you to get your other pr up. Thank you for contributing!