Skip to content

Commit

Permalink
Replace old tables with new unicode data
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Jan 15, 2020
1 parent 40ad877 commit efcda04
Show file tree
Hide file tree
Showing 6 changed files with 2,353 additions and 3,189 deletions.
16 changes: 8 additions & 8 deletions src/libcore/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use crate::slice;
use crate::str::from_utf8_unchecked_mut;
use crate::unicode::printable::is_printable;
use crate::unicode::tables::{conversions, derived_property, general_category, property};
use crate::unicode::{self, conversions};

use super::*;

Expand Down Expand Up @@ -552,7 +552,7 @@ impl char {
pub fn is_alphabetic(self) -> bool {
match self {
'a'..='z' | 'A'..='Z' => true,
c => c > '\x7f' && derived_property::Alphabetic(c),
c => c > '\x7f' && unicode::Alphabetic(c),
}
}

Expand Down Expand Up @@ -583,7 +583,7 @@ impl char {
pub fn is_lowercase(self) -> bool {
match self {
'a'..='z' => true,
c => c > '\x7f' && derived_property::Lowercase(c),
c => c > '\x7f' && unicode::Lowercase(c),
}
}

Expand Down Expand Up @@ -614,7 +614,7 @@ impl char {
pub fn is_uppercase(self) -> bool {
match self {
'A'..='Z' => true,
c => c > '\x7f' && derived_property::Uppercase(c),
c => c > '\x7f' && unicode::Uppercase(c),
}
}

Expand Down Expand Up @@ -642,7 +642,7 @@ impl char {
pub fn is_whitespace(self) -> bool {
match self {
' ' | '\x09'..='\x0d' => true,
c => c > '\x7f' && property::White_Space(c),
c => c > '\x7f' && unicode::White_Space(c),
}
}

Expand Down Expand Up @@ -693,7 +693,7 @@ impl char {
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn is_control(self) -> bool {
general_category::Cc(self)
unicode::Cc(self)
}

/// Returns `true` if this `char` has the `Grapheme_Extend` property.
Expand All @@ -707,7 +707,7 @@ impl char {
/// [`DerivedCoreProperties.txt`]: https://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt
#[inline]
pub(crate) fn is_grapheme_extended(self) -> bool {
derived_property::Grapheme_Extend(self)
unicode::Grapheme_Extend(self)
}

/// Returns `true` if this `char` has one of the general categories for numbers.
Expand Down Expand Up @@ -739,7 +739,7 @@ impl char {
pub fn is_numeric(self) -> bool {
match self {
'0'..='9' => true,
c => c > '\x7f' && general_category::N(c),
c => c > '\x7f' && unicode::N(c),
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/libcore/char/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ pub use self::decode::{decode_utf16, DecodeUtf16, DecodeUtf16Error};

// unstable re-exports
#[unstable(feature = "unicode_version", issue = "49726")]
pub use crate::unicode::tables::UNICODE_VERSION;
#[unstable(feature = "unicode_version", issue = "49726")]
pub use crate::unicode::version::UnicodeVersion;
#[unstable(feature = "unicode_version", issue = "49726")]
pub use crate::unicode::UNICODE_VERSION;

use crate::fmt::{self, Write};
use crate::iter::FusedIterator;
Expand Down
66 changes: 0 additions & 66 deletions src/libcore/unicode/bool_trie.rs

This file was deleted.

Loading

0 comments on commit efcda04

Please sign in to comment.