Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print key values #14

Merged
merged 1 commit into from
Nov 22, 2019
Merged

Print key values #14

merged 1 commit into from
Nov 22, 2019

Conversation

Thomasdezeeuw
Copy link
Owner

Log issue for structured logging: rust-lang/log#149, implementation: rust-lang/log#324.

impl<'a> fmt::Display for KeyValuePrinter<'a> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.visit(&mut KeyValueVisitor(true, f))
.map_err(|_| fmt::Error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should support using the ? operator here.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, the following should work too. But it's the same amount of lines anyway.

       self.0.visit(&mut KeyValueVisitor(true, f))?;
       Ok(());

@Thomasdezeeuw Thomasdezeeuw changed the title [WIP] Print key values Print key values Nov 22, 2019
@Thomasdezeeuw Thomasdezeeuw merged commit d7c9e34 into master Nov 22, 2019
@Thomasdezeeuw Thomasdezeeuw deleted the unstable-kv branch November 22, 2019 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants