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

Add leading zeros support. #465

Merged
merged 1 commit into from
May 14, 2021
Merged

Conversation

derekdreery
Copy link
Contributor

This adds support for things like info!("{=u16:08X}", 42"). It is tested in the mdbook.

I could have added precision support as well, but I figure floats aren't so often used on embedded, whereas printing out a u32 nicely aligned is a common task.

@derekdreery
Copy link
Contributor Author

Ok need to fix up some tests

@derekdreery
Copy link
Contributor Author

derekdreery commented May 10, 2021

Would you mind setting off the CI again?

Copy link
Member

@Urhengulas Urhengulas left a comment

Choose a reason for hiding this comment

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

Looks good after a first quick glimpse 😄 Will try it out tomorrow.

parser/src/lib.rs Outdated Show resolved Hide resolved
parser/src/lib.rs Show resolved Hide resolved
parser/src/lib.rs Outdated Show resolved Hide resolved
@derekdreery
Copy link
Contributor Author

Could anyone help me understand the output from the qemu test?

@Urhengulas
Copy link
Member

Could anyone help me understand the output from the qemu test?

What do you mean? qemu-snapshot?

Copy link
Member

@Urhengulas Urhengulas left a comment

Choose a reason for hiding this comment

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

Overall I am good now, only two topics:

  1. a small nit about formatting some match arms 😁 (see suggestions)
  2. please remove the changes to xtask from this pr and send it as separate one :)

decoder/src/frame.rs Outdated Show resolved Hide resolved
@derekdreery
Copy link
Contributor Author

Made requested changes.

@Urhengulas
Copy link
Member

Awesome! Please rebase and then we can merge (if you "allow edit from maintainers" i can also do this for you, see https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)

@derekdreery
Copy link
Contributor Author

derekdreery commented May 14, 2021

Squashed and rebased. You should already have the ability to edit this PR (the box is ticked).

@Urhengulas
Copy link
Member

bors r+

@Urhengulas
Copy link
Member

Thank you for the PR @derekdreery! Feel free to send your PR for xtask :D

@bors
Copy link
Contributor

bors bot commented May 14, 2021

Build succeeded:

@bors bors bot merged commit 8af1a43 into knurling-rs:main May 14, 2021
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.

3 participants