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

Rename write_cmp_bytes to writeable_cmp_bytes #4795

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

sffc
Copy link
Member

@sffc sffc commented Apr 11, 2024

See #4402, #4741, #4787

I had landed these functions but we never bikeshed their names. We did bikeshed writeable_length_hint here, so I'm taking that answer and applying it to this similar function. It should be named writeable_cmp_bytes since it isn't actually writing anything; it's only a function on the Writeable trait.

@sffc sffc removed request for a team and nciric April 11, 2024 04:28
@sffc
Copy link
Member Author

sffc commented Apr 11, 2024

If possible I'd like LGTMs from multiple organizations on this function name.

@sffc
Copy link
Member Author

sffc commented Apr 11, 2024

Note that we chose writeable_length_hint over writeable_len_hint, so in principle we could also choose to name this function writeable_compare_bytes instead of writeable_cmp_bytes.

robertbastian
robertbastian previously approved these changes Apr 11, 2024
@@ -351,7 +351,7 @@ macro_rules! impl_display_with_writeable {
/// - Equality of string content
/// - Equality of parts ([`*_parts_eq`] only)
/// - Validity of size hint
/// - Reflexivity of `cmp_bytes`
/// - Reflexivity of `cmp_bytes` and order against largest and smallest strings
Copy link
Member

Choose a reason for hiding this comment

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

nice, I was thinking about adding this

@sffc sffc requested a review from echeran April 11, 2024 17:37
Manishearth
Manishearth previously approved these changes Apr 11, 2024
utils/writeable/src/lib.rs Outdated Show resolved Hide resolved
utils/writeable/src/try_writeable.rs Outdated Show resolved Hide resolved
@sffc sffc dismissed stale reviews from Manishearth and robertbastian via fb5949a April 12, 2024 05:57
@robertbastian
Copy link
Member

Waiting on ballot results

@sffc
Copy link
Member Author

sffc commented Apr 18, 2024

This name won the ballot. Merging.

@sffc sffc merged commit c7f2424 into unicode-org:main Apr 18, 2024
30 checks passed
@sffc sffc deleted the writeable_cmp_bytes branch April 18, 2024 22:13
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