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

feat: implement Debug trait for more types #154

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

Sherlock-Holo
Copy link
Contributor

this PR can make all types implement Debug trait

@Sherlock-Holo
Copy link
Contributor Author

This pr is useful for people who using instrument macros, consider this codes:

#[derive(Debug)]
struct Server {
    rx: RecvStream<SomeThing>
}

impl Server {
    #[instrument(err)]
    async fn do_some_thing(&self, req: Request) -> Result<Respone, Error> {
        // logic codes....
    }
}

if RecvStream doesn't implement, user have to add skip(self) to #[instrument], or write Debug implement codes manually, or use other custom_debug crate

Copy link
Owner

@zesterer zesterer left a comment

Choose a reason for hiding this comment

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

Thanks!

@zesterer zesterer merged commit b935714 into zesterer:master Sep 18, 2024
5 checks passed
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