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

Turned all 0x1b_u8.into() into '\x1b' in the docs #91040

Closed
wants to merge 3 commits into from

Conversation

mahmoud-moursy
Copy link
Contributor

Housekeeping to keep docs clean and up to date -- turned all instances of 0x1b_u8.into() into \x1b when I stumbled upon this in the Rust docs.

Tested these changes using this code:

fn main() {
    let esc: char = 0x1b_u8.into();
    let esc_2 = '\x1b';
    
    assert_eq!(esc, esc_2);
}

It exited and returned code 0.

Housekeeping to keep docs clean and up to date.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 19, 2021
@wooster0
Copy link
Contributor

wooster0 commented Nov 19, 2021

There seem to be more occurrences in https://github.com/rust-lang/rust/blob/master/library/core/src/num/mod.rs like for example:

    /// let lf = b'\n';
    /// let esc = 0x1b_u8;
    ///

Do you want to turn those into b'\x1b'?

They are unnecessary as of Rust 2021

Co-authored-by: r00ster <r00ster91@protonmail.com>
@mahmoud-moursy
Copy link
Contributor Author

Do you want to turn those into b'\x1b'?

I would love to, but traversing the entirety of Rust's source code to find these instances would take me a lot of time.

@wooster0
Copy link
Contributor

@T-O-R-U-S there are actually not that many. Here's what I meant: #91044

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 19, 2021
Turn all 0x1b_u8 into '\x1b' or b'\x1b'

Supersedes rust-lang#91040
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 19, 2021
Turn all 0x1b_u8 into '\x1b' or b'\x1b'

Supersedes rust-lang#91040
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 19, 2021
Turn all 0x1b_u8 into '\x1b' or b'\x1b'

Supersedes rust-lang#91040
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 20, 2021
Turn all 0x1b_u8 into '\x1b' or b'\x1b'

Supersedes rust-lang#91040
@bors
Copy link
Contributor

bors commented Nov 20, 2021

☔ The latest upstream changes (presumably #91064) made this pull request unmergeable. Please resolve the merge conflicts.

@apiraino apiraino added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Nov 22, 2021
@m-ou-se
Copy link
Member

m-ou-se commented Nov 23, 2021

Closing this, since #91044 has already been merged.

@m-ou-se m-ou-se closed this Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants