Skip to content

Conversation

koka831
Copy link
Contributor

@koka831 koka831 commented Nov 18, 2022

While I did some investigation of #9866 (I couldn't reproduce it though) I found that unused_rounding formats as follows:

3.0_f64.round() // => 3.0f64

This PR makes them preserve as the original notation.

3.0_f64.round() // => 3.0_f64

changelog: Suggestion Enhancement: [unused_rounding]: The suggestion now preserves the original float literal notation

@rust-highfive
Copy link

r? @Jarcho

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Nov 18, 2022
@Jarcho
Copy link
Contributor

Jarcho commented Nov 19, 2022

This should just grab a snippet of the receiver rather than rebuild the string.

@koka831
Copy link
Contributor Author

koka831 commented Nov 19, 2022

Thank you for review, that's right.
fixed it in 1baa6cd .

@Jarcho
Copy link
Contributor

Jarcho commented Nov 20, 2022

Thank you. @bors r+

@bors
Copy link
Contributor

bors commented Nov 20, 2022

📌 Commit 1baa6cd has been approved by Jarcho

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 20, 2022

⌛ Testing commit 1baa6cd with merge a85c8f3...

@bors
Copy link
Contributor

bors commented Nov 20, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Jarcho
Pushing a85c8f3 to master...

@bors bors merged commit a85c8f3 into rust-lang:master Nov 20, 2022
@bors bors mentioned this pull request Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants