Respect fmt trait and flags in Value#400
Merged
Merged
Conversation
KodrAus
commented
Jun 4, 2020
KodrAus
commented
Jun 4, 2020
| } | ||
| } | ||
|
|
||
| struct SvalVisitor<'a, 'b: 'a>(&'a mut sval::value::Stream<'b>); |
Contributor
Author
There was a problem hiding this comment.
Just moved up into the impl block, like the visitors in the fmt module.
KodrAus
commented
Jun 4, 2020
| } | ||
| } | ||
|
|
||
| impl From<Error> for io::Error { |
Contributor
Author
There was a problem hiding this comment.
We removed a similar external From impl in #398 that was causing problems with inference.
Fishrock123
added a commit
to Fishrock123/femme
that referenced
this pull request
Nov 24, 2020
rust-lang/log#400 was merged upstream and caused this crate's json key-value logging to break. This is problem for Tide, which uses key-value logging in it's default log middleware. Fixes: lrlna#17 Refs: http-rs/tide#752
lrlna
added a commit
to lrlna/femme
that referenced
this pull request
Dec 4, 2020
rust-lang/log#400 was merged upstream and caused this crate's json key-value logging to break. This is problem for Tide, which uses key-value logging in it's default log middleware. Fixes: #17 Refs: http-rs/tide#752 Co-authored-by: Irina Shestak <lrlna@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #395
This PR makes the
fmt::Debugandfmt::Displayimpls onValuerespect the trait being used and any flags present. I've added a separate visitor forDisplaythat uses the right trait, and pass the value directly to the formatter instead of going throughformat_args.There are some extra tests for formatting and I've shifted a few pieces around to be consistent.
Tests won't pass until I fix sval-rs/sval#84 as well.r? @yoshuawuyts