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

style: simplify statements for readability #6978

Merged

Conversation

hamirmahal
Copy link
Contributor

Closes #6977

Motivation

Some lines like

format!("The `{}` attribute requires an argument.", name)

aren't as readable as they could be.

Solution

We can replace lines like

format!("The `{}` attribute requires an argument.", name)

with

format!("The `{name}` attribute requires an argument.")

to improve code readability and maintainability.

@github-actions github-actions bot added R-loom-multi-thread Run loom multi-thread tests on this PR R-loom-sync Run loom sync tests on this PR R-loom-time-driver Run loom time driver tests on this PR labels Nov 16, 2024
Copy link
Contributor Author

@hamirmahal hamirmahal left a comment

Choose a reason for hiding this comment

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

This shouldn't cause any user-facing changes.

The goal of this pull request is to improve code readability and developer productivity.

@nurmohammed840
Copy link
Contributor

Nice!
Did you use any tools for this, or was it done manually?

@hamirmahal
Copy link
Contributor Author

I did! I used clippy.

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

Thanks.

@Darksonn Darksonn merged commit d4178cf into tokio-rs:master Nov 18, 2024
82 checks passed
@hamirmahal hamirmahal deleted the style/simplify-statements-for-readability branch November 18, 2024 20:27
@hamirmahal
Copy link
Contributor Author

You're welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R-loom-multi-thread Run loom multi-thread tests on this PR R-loom-sync Run loom sync tests on this PR R-loom-time-driver Run loom time driver tests on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some statements can be simplified for readability
3 participants