Skip to content

Commit 89cfa7b

Browse files
committed
---
yaml --- r: 234893 b: refs/heads/stable c: 32b7b50 h: refs/heads/master i: 234891: d87a62b v: v3
1 parent 4cce101 commit 89cfa7b

File tree

6 files changed

+3
-590
lines changed

6 files changed

+3
-590
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 124d1657cc2e321a66e78e9bc5fd4e966f46da42
32+
refs/heads/stable: 32b7b50bafd0d40fda1caa93cf7f7068cc5052e3
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/etc/unicode.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,6 @@ def emit_conversions_module(f, to_upper, to_lower, to_title):
372372
}
373373
}
374374
375-
pub fn to_title(c: char) -> [char; 3] {
376-
match bsearch_case_table(c, to_titlecase_table) {
377-
None => [c, '\\0', '\\0'],
378-
Some(index) => to_titlecase_table[index].1
379-
}
380-
}
381-
382375
fn bsearch_case_table(c: char, table: &'static [(char, [char; 3])]) -> Option<usize> {
383376
match table.binary_search_by(|&(key, _)| {
384377
if c == key { Equal }
@@ -400,9 +393,6 @@ def emit_conversions_module(f, to_upper, to_lower, to_title):
400393
emit_table(f, "to_uppercase_table",
401394
sorted(to_upper.iteritems(), key=operator.itemgetter(0)),
402395
is_pub=False, t_type = t_type, pfun=pfun)
403-
emit_table(f, "to_titlecase_table",
404-
sorted(to_title.iteritems(), key=operator.itemgetter(0)),
405-
is_pub=False, t_type = t_type, pfun=pfun)
406396
f.write("}\n\n")
407397

408398
def emit_grapheme_module(f, grapheme_table, grapheme_cats):

branches/stable/src/libcollections/vec.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ impl<T> FromIterator<T> for Vec<T> {
14821482
None => return Vec::new(),
14831483
Some(element) => {
14841484
let (lower, _) = iterator.size_hint();
1485-
let mut vector = Vec::with_capacity(lower.saturating_add(1));
1485+
let mut vector = Vec::with_capacity(1 + lower);
14861486
unsafe {
14871487
ptr::write(vector.get_unchecked_mut(0), element);
14881488
vector.set_len(1);
@@ -1570,11 +1570,10 @@ impl<T> Vec<T> {
15701570
let len = self.len();
15711571
if len == self.capacity() {
15721572
let (lower, _) = iterator.size_hint();
1573-
self.reserve(lower.saturating_add(1));
1573+
self.reserve(lower + 1);
15741574
}
15751575
unsafe {
15761576
ptr::write(self.get_unchecked_mut(len), element);
1577-
// NB can't overflow since we would have had to alloc the address space
15781577
self.set_len(len + 1);
15791578
}
15801579
}

branches/stable/src/libcoretest/char.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -102,29 +102,6 @@ fn test_to_uppercase() {
102102
assert_eq!(upper('ᾀ'), ['Ἀ', 'Ι']);
103103
}
104104

105-
#[test]
106-
fn test_to_titlecase() {
107-
fn title(c: char) -> Vec<char> {
108-
c.to_titlecase().collect()
109-
}
110-
assert_eq!(title('a'), ['A']);
111-
assert_eq!(title('ö'), ['Ö']);
112-
assert_eq!(title('ß'), ['S', 's']); // not ẞ: Latin capital letter sharp s
113-
assert_eq!(title('ü'), ['Ü']);
114-
assert_eq!(title('💩'), ['💩']);
115-
116-
assert_eq!(title('σ'), ['Σ']);
117-
assert_eq!(title('τ'), ['Τ']);
118-
assert_eq!(title('ι'), ['Ι']);
119-
assert_eq!(title('γ'), ['Γ']);
120-
assert_eq!(title('μ'), ['Μ']);
121-
assert_eq!(title('α'), ['Α']);
122-
assert_eq!(title('ς'), ['Σ']);
123-
assert_eq!(title('DŽ'), ['Dž']);
124-
assert_eq!(title('fi'), ['F', 'i']);
125-
assert_eq!(title('ᾀ'), ['ᾈ']);
126-
}
127-
128105
#[test]
129106
fn test_is_control() {
130107
assert!('\u{0}'.is_control());

branches/stable/src/librustc_unicode/char.rs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,6 @@ impl Iterator for ToUppercase {
6767
fn next(&mut self) -> Option<char> { self.0.next() }
6868
}
6969

70-
/// An iterator over the titlecase mapping of a given character, returned from
71-
/// the [`to_titlecase` method](../primitive.char.html#method.to_titlecase) on
72-
/// characters.
73-
#[unstable(feature = "unicode", reason = "recently added")]
74-
pub struct ToTitlecase(CaseMappingIter);
75-
76-
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
77-
impl Iterator for ToTitlecase {
78-
type Item = char;
79-
fn next(&mut self) -> Option<char> { self.0.next() }
80-
}
81-
8270

8371
enum CaseMappingIter {
8472
Three(char, char, char),
@@ -477,27 +465,6 @@ impl char {
477465
ToLowercase(CaseMappingIter::new(conversions::to_lower(self)))
478466
}
479467

480-
/// Converts a character to its titlecase equivalent.
481-
///
482-
/// This performs complex unconditional mappings with no tailoring.
483-
/// See `to_uppercase()` for references and more information.
484-
///
485-
/// This differs from `to_uppercase()` since Unicode contains
486-
/// digraphs and ligature characters.
487-
/// For example, U+01F3 “dz” and U+FB01 “fi”
488-
/// map to U+01F1 “DZ” and U+0046 U+0069 “Fi”, respectively.
489-
///
490-
/// # Return value
491-
///
492-
/// Returns an iterator which yields the characters corresponding to the
493-
/// titlecase equivalent of the character. If no conversion is possible then
494-
/// an iterator with just the input character is returned.
495-
#[unstable(feature = "unicode", reason = "recently added")]
496-
#[inline]
497-
pub fn to_titlecase(self) -> ToTitlecase {
498-
ToTitlecase(CaseMappingIter::new(conversions::to_title(self)))
499-
}
500-
501468
/// Converts a character to its uppercase equivalent.
502469
///
503470
/// This performs complex unconditional mappings with no tailoring:

0 commit comments

Comments
 (0)