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

fix: #337: use 'ryu' instead of 'lexical' for formatting #387

Closed
wants to merge 1 commit into from

Conversation

BatmanAoD
Copy link
Contributor

@BatmanAoD BatmanAoD commented Aug 9, 2024

Fixes #337

Looks like ryu always prints a trailing .0 for integers values.

@BatmanAoD BatmanAoD changed the title fix: use 'ryu' instead of 'lexical' for formatting fix: #337: use 'ryu' instead of 'lexical' for formatting Aug 9, 2024
if value.im > 0f64 {
out.push('+')
let mut out = ryu::Buffer::new().format(value.re).to_owned();
match value.im {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't mind going back to the else if/else here, but this seems slightly nicer to me, personally.

Copy link

github-actions bot commented Aug 9, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://rigetti.github.io/quil-rs/pr-preview/pr-387/
on branch quil-py-docs at 2024-08-09 22:23 UTC

@BatmanAoD BatmanAoD force-pushed the 337-remove-lexical branch 2 times, most recently from 14e0be8 to fddc14a Compare August 9, 2024 22:20
@BatmanAoD BatmanAoD marked this pull request as draft August 9, 2024 22:25
@BatmanAoD BatmanAoD mentioned this pull request Sep 16, 2024
@BatmanAoD BatmanAoD closed this Sep 16, 2024
@BatmanAoD BatmanAoD deleted the 337-remove-lexical branch September 16, 2024 22:57
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.

Remove dependency on lexical
1 participant