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

Format and comment fixes #149

Closed
wants to merge 0 commits into from
Closed

Format and comment fixes #149

wants to merge 0 commits into from

Conversation

Kuly14
Copy link

@Kuly14 Kuly14 commented Jun 25, 2023

Very minor pr that fixes a weird format error and 2 comments.

@@ -173,7 +173,7 @@ macro_rules! wrap_fixed_bytes {
/// Returns the inner bytes array.
#[inline]
pub const fn into_array(self) -> [u8; $n] {
self.0 .0
self.0.0
Copy link
Member

Choose a reason for hiding this comment

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

This is actually intentional since Rust parses the 0.0 as a float literal and rustfmt will prefer the separated version, but both work

Copy link
Author

@Kuly14 Kuly14 Jun 25, 2023

Choose a reason for hiding this comment

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

Oh ok, had no idea. Thanks for explaining!

Just out of curiosity where did you learn about a thing like that? Did you work on the formatter or something?😂

Copy link
Member

Choose a reason for hiding this comment

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

rustfmt formats self.0.0 to self.0 .0 if you try it (top left, tools -> rustfmt):
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=fc90885df6ae8d4805352d11061f9a2b

@DaniPopes DaniPopes enabled auto-merge (squash) June 25, 2023 18:31
@prestwich prestwich closed this Jun 25, 2023
auto-merge was automatically disabled June 25, 2023 19:39

Pull request was closed

@prestwich prestwich mentioned this pull request Jun 25, 2023
@prestwich
Copy link
Member

this work is now in #151 because the rebase did something weird to github's interpretation of the branch and i can't reopen this. 😮‍💨

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