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 copying ascii::Char methods from as_ to to_ #114641

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

kupiakos
Copy link
Contributor

@kupiakos kupiakos commented Aug 8, 2023

Tracking issue: #110998.

The API guidelines describe as_ as used for borrowed -> borrowed operations, and to_ for
owned -> owned operations on Copy types.

Tracking issue: rust-lang#110998.

The [API guidelines][naming] describe `as` as used for
borrowed -> borrowed operations, and `to_` for
owned -> owned operations on `Copy` types.

[naming]: https://rust-lang.github.io/api-guidelines/naming.html
@rustbot
Copy link
Collaborator

rustbot commented Aug 8, 2023

r? @Mark-Simulacrum

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 8, 2023
@kupiakos
Copy link
Contributor Author

kupiakos commented Aug 8, 2023

r? @scottmcm

@rustbot rustbot assigned scottmcm and unassigned Mark-Simulacrum Aug 8, 2023
@scottmcm
Copy link
Member

scottmcm commented Aug 9, 2023

Hmm, there's no char::{as,to}_u32 to compare with, but the inverse is called char::from_u32, so I guess using to here makes sense.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 9, 2023

📌 Commit a22b9bf has been approved by scottmcm

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 9, 2023
@kupiakos
Copy link
Contributor Author

kupiakos commented Aug 9, 2023

there's no char::{as,to}_u32 to compare with

The appropriate comparisons would be

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 9, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#113939 (open pidfd in child process and send to the parent via SOCK_SEQPACKET+CMSG)
 - rust-lang#114548 (Migrate a trait selection error to use diagnostic translation)
 - rust-lang#114606 (fix: not insert missing lifetime for `ConstParamTy`)
 - rust-lang#114634 (Mention riscv64-linux-android support in Android documentation)
 - rust-lang#114638 (Remove old RPITIT tests (revisions were removed))
 - rust-lang#114641 (Rename copying `ascii::Char` methods from `as_` to `to_`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 83da317 into rust-lang:master Aug 9, 2023
@rustbot rustbot added this to the 1.73.0 milestone Aug 9, 2023
@scottmcm
Copy link
Member

scottmcm commented Aug 9, 2023

I was thinking of it like #86772's as_repr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants