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

core: impl field::Value for Option<T> #1393

Closed
wants to merge 2 commits into from
Closed

core: impl field::Value for Option<T> #1393

wants to merge 2 commits into from

Conversation

DCjanus
Copy link

@DCjanus DCjanus commented May 9, 2021

Motivation

Build a span with some field might be None is bother now.

Before:

let span = info!("example", data = Empty );
if let Some(data) = foo() {
    span.record("data", &data);
}

After:

let span = info!("example", data = foo() );

@DCjanus DCjanus requested review from carllerche and hawkw as code owners May 9, 2021 13:09
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

thanks, looks good to me.

it would be nice to have some tests for this, if you have the time?

@liamdawson
Copy link

This would close #824, right?

@hawkw
Copy link
Member

hawkw commented Sep 24, 2021

merged in #1585.

@hawkw hawkw closed this Sep 24, 2021
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.

3 participants