Add serde impls for LogLevel/LogLevelFilter #143

Closed
opened 2017-05-19 14:53:46 -05:00 by alexcrichton · 3 comments
alexcrichton commented 2017-05-19 14:53:46 -05:00 (Migrated from github.com)
No description provided.
meven commented 2017-05-26 06:02:16 -05:00 (Migrated from github.com)

I would like some guidance before making a pull-request for this.
In your opinion, should it use #derive (with a optinal dependency) as documented https://serde.rs/derive.html or should it implement directly the Serialive and Deserialize impls as documented https://serde.rs/custom-serialization.html
I would favor the former as is avoids adding any dependency.

I would like some guidance before making a pull-request for this. In your opinion, should it use #derive (with a optinal dependency) as documented https://serde.rs/derive.html or should it implement directly the Serialive and Deserialize impls as documented https://serde.rs/custom-serialization.html I would favor the former as is avoids adding any dependency.
dtolnay commented 2017-05-26 10:42:33 -05:00 (Migrated from github.com)

You will need at least Deserialize to be custom to match the case insensitive behavior of FromStr. And Serialize is only going to be a few lines so not worth pulling in serde_derive for that, in my opinion.

You will need at least Deserialize to be custom to match the case insensitive behavior of FromStr. And Serialize is only going to be a few lines so not worth pulling in serde_derive for that, in my opinion.
dtolnay commented 2017-05-29 22:53:53 -05:00 (Migrated from github.com)

I filed #183 to follow up on whether all caps is the best choice for the Serialize impls.

I filed #183 to follow up on whether all caps is the best choice for the Serialize impls.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-rust-lang/log#143
No description provided.