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

Use inline format args #2232

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Use inline format args #2232

merged 1 commit into from
Sep 19, 2023

Conversation

nyurik
Copy link
Contributor

@nyurik nyurik commented Sep 19, 2023

Motivation

Do a few format arg inlining to make the code a bit more concise and easier to read. In some rare cases this also prevents double-refs, e.g. format!("{}", &foo), which cases a small run-time perf penalty.

This PR also updates many docs examples for the same reason.

Do a few format arg inlining to make the code a bit more concise and easier to read.  In some rare cases this also prevents double-refs, e.g. `format!("{}", &foo)`, which cases a small run-time perf penalty.
Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

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

Thanks!

@davidpdrsn davidpdrsn changed the title Chore: Inline format args for easier reading Use inline format args Sep 19, 2023
@davidpdrsn davidpdrsn enabled auto-merge (squash) September 19, 2023 06:44
@davidpdrsn davidpdrsn merged commit 786329d into tokio-rs:main Sep 19, 2023
18 checks passed
@nyurik nyurik deleted the inline-fmt branch September 19, 2023 08:58
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