Skip to content

Rename include_bin! to include_bytes! #20117

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

Merged
merged 1 commit into from
Dec 24, 2014
Merged

Rename include_bin! to include_bytes! #20117

merged 1 commit into from
Dec 24, 2014

Conversation

lambda-fairy
Copy link
Contributor

According to RFC 344, methods that return &[u8] should have names ending in bytes. Though include_bin! is a macro not a method, it seems reasonable to follow the convention anyway.

We keep the old name around for now, but trigger a deprecation warning when it is used.

[breaking-change]

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

I agree, thanks! Could you do two more things as well?

  1. Make sure to mention in the commit message that this is a [breaking-change] as well as making sure the commit message is in accordance with our breaking changes policy.
  2. Could you leave the old macro around for now with a message declaring that it is deprecated?

According to [RFC 344][], methods that return `&[u8]` should have names
ending in `bytes`. Though `include_bin!` is a macro not a method, it
seems reasonable to follow the convention anyway.

We keep the old name around for now, but trigger a deprecation warning
when it is used.

[RFC 344]: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md

[breaking-change]
@lambda-fairy
Copy link
Contributor Author

Thanks for the suggestions -- I've reworded the commit message, and added a deprecation warning.

r again? @alexcrichton

(By the way, Merry Christmas!)

@alexcrichton
Copy link
Member

Thanks! And merry christmas to you too :)

bors added a commit that referenced this pull request Dec 24, 2014
According to [RFC 344][], methods that return `&[u8]` should have names ending in `bytes`. Though `include_bin!` is a macro not a method, it seems reasonable to follow the convention anyway.

We keep the old name around for now, but trigger a deprecation warning when it is used.

[RFC 344]: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md

[breaking-change]
@bors bors merged commit 85c1a4b into rust-lang:master Dec 24, 2014
@lambda-fairy lambda-fairy deleted the rename-include-bin branch February 4, 2016 06:43
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.

4 participants