Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
389 changes: 271 additions & 118 deletions library/core/src/char/methods.rs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2941,7 +2941,7 @@ impl Debug for str {
let mut chars = rest.chars();
if let Some(c) = chars.next() {
let esc = c.escape_debug_ext(EscapeDebugExtArgs {
escape_grapheme_extended: true,
escape_grapheme_extender: true,
escape_single_quote: false,
escape_double_quote: true,
});
Expand Down Expand Up @@ -2973,7 +2973,7 @@ impl Debug for char {
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
f.write_char('\'')?;
let esc = self.escape_debug_ext(EscapeDebugExtArgs {
escape_grapheme_extended: true,
escape_grapheme_extender: true,
escape_single_quote: true,
escape_double_quote: false,
});
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/str/lossy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl fmt::Debug for Debug<'_> {
let mut from = 0;
for (i, c) in valid.char_indices() {
let esc = c.escape_debug_ext(EscapeDebugExtArgs {
escape_grapheme_extended: true,
escape_grapheme_extender: true,
escape_single_quote: false,
escape_double_quote: true,
});
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3195,7 +3195,7 @@ impl_fn_for_zst! {
#[derive(Clone)]
struct CharEscapeDebugContinue impl Fn = |c: char| -> char::EscapeDebug {
c.escape_debug_ext(EscapeDebugExtArgs {
escape_grapheme_extended: false,
escape_grapheme_extender: false,
escape_single_quote: true,
escape_double_quote: true
})
Expand Down
14 changes: 10 additions & 4 deletions library/core/src/unicode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ pub use unicode_data::conversions;
#[rustfmt::skip]
pub(crate) use unicode_data::alphabetic::lookup as Alphabetic;
pub(crate) use unicode_data::case_ignorable::lookup as Case_Ignorable;
pub(crate) use unicode_data::cf::lookup as Cf;
pub(crate) use unicode_data::cn_planes_0_3::lookup as Cn_planes_0_3;
pub(crate) use unicode_data::default_ignorable_code_point::lookup as Default_Ignorable_Code_Point;
pub(crate) use unicode_data::grapheme_extend::lookup as Grapheme_Extend;
pub(crate) use unicode_data::lowercase::lookup as Lowercase;
pub(crate) use unicode_data::lt::lookup as Lt;
pub(crate) use unicode_data::n::lookup as N;
pub(crate) use unicode_data::uppercase::lookup as Uppercase;
pub(crate) use unicode_data::white_space::lookup as White_Space;

pub(crate) mod printable;

#[allow(unreachable_pub)]
pub mod unicode_data;

Expand All @@ -27,8 +28,13 @@ pub mod unicode_data;
/// New versions of Unicode are released regularly and subsequently all methods
/// in the standard library depending on Unicode are updated. Therefore the
/// behavior of some `char` and `str` methods and the value of this constant
/// changes over time. This is *not* considered to be a breaking change.
/// changes over time, within the boundaries of Unicode's [stability policies].
/// This is *not* considered to be a breaking change.
///
/// [stability policies]: https://www.unicode.org/policies/stability_policy.html
///
/// The version numbering scheme is explained in
/// [Unicode 11.0 or later, Section 3.1 Versions of the Unicode Standard](https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf#page=4).
/// [Section 3.1 (Version Numbering)] of the Unicode Standard.
///
/// [Section 3.1 (Version Numbering)]: https://www.unicode.org/versions/latest/core-spec/chapter-3/#G49512
pub const UNICODE_VERSION: (u8, u8, u8) = unicode_data::UNICODE_VERSION;
258 changes: 0 additions & 258 deletions library/core/src/unicode/printable.py

This file was deleted.

Loading
Loading