about summary refs log tree commit diff
path: root/src/libunicode
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-27 04:32:12 +0000
committerbors <bors@rust-lang.org>2014-11-27 04:32:12 +0000
commitf358ca45c8cf8a5ea8922b5c66403d6a4f4d52ad (patch)
tree755e6d6f67ea238da49c5a697375b20b2513bc66 /src/libunicode
parentfac5a07679cac21a580badc84b755b8df0f975cf (diff)
parent5816d7f5305ce4401326568785d624e689064311 (diff)
downloadrust-f358ca45c8cf8a5ea8922b5c66403d6a4f4d52ad.tar.gz
rust-f358ca45c8cf8a5ea8922b5c66403d6a4f4d52ad.zip
auto merge of #19342 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libunicode')
-rw-r--r--src/libunicode/normalize.rs13
-rw-r--r--src/libunicode/tables.rs16
-rw-r--r--src/libunicode/u_char.rs10
-rw-r--r--src/libunicode/u_str.rs10
4 files changed, 21 insertions, 28 deletions
diff --git a/src/libunicode/normalize.rs b/src/libunicode/normalize.rs
index ad36215c11b..cd46fc6a56d 100644
--- a/src/libunicode/normalize.rs
+++ b/src/libunicode/normalize.rs
@@ -8,10 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-/*!
-  Functions for computing canonical and compatible decompositions
-  for Unicode characters.
-  */
+//! Functions for computing canonical and compatible decompositions for Unicode characters.
 
 use core::cmp::{Equal, Less, Greater};
 use core::option::{Option, Some, None};
@@ -25,11 +22,11 @@ fn bsearch_table<T>(c: char, r: &'static [(char, &'static [T])]) -> Option<&'sta
         else if val < c { Less }
         else { Greater }
     }) {
-        slice::Found(idx) => {
+        slice::BinarySearchResult::Found(idx) => {
             let (_, result) = r[idx];
             Some(result)
         }
-        slice::NotFound(_) => None
+        slice::BinarySearchResult::NotFound(_) => None
     }
 }
 
@@ -88,11 +85,11 @@ pub fn compose(a: char, b: char) -> Option<char> {
                     else if val < b { Less }
                     else { Greater }
                 }) {
-                    slice::Found(idx) => {
+                    slice::BinarySearchResult::Found(idx) => {
                         let (_, result) = candidates[idx];
                         Some(result)
                     }
-                    slice::NotFound(_) => None
+                    slice::BinarySearchResult::NotFound(_) => None
                 }
             }
         }
diff --git a/src/libunicode/tables.rs b/src/libunicode/tables.rs
index dfba686143f..7cece6701dc 100644
--- a/src/libunicode/tables.rs
+++ b/src/libunicode/tables.rs
@@ -6249,11 +6249,11 @@ pub mod normalization {
             else if hi < c { Less }
             else { Greater }
         }) {
-            slice::Found(idx) => {
+            slice::BinarySearchResult::Found(idx) => {
                 let (_, _, result) = r[idx];
                 result
             }
-            slice::NotFound(_) => 0
+            slice::BinarySearchResult::NotFound(_) => 0
         }
     }
 
@@ -6392,8 +6392,8 @@ pub mod conversions {
             else if key < c { Less }
             else { Greater }
         }) {
-            slice::Found(i) => Some(i),
-            slice::NotFound(_) => None,
+            slice::BinarySearchResult::Found(i) => Some(i),
+            slice::BinarySearchResult::NotFound(_) => None,
         }
     }
 
@@ -6945,11 +6945,11 @@ pub mod charwidth {
             else if hi < c { Less }
             else { Greater }
         }) {
-            slice::Found(idx) => {
+            slice::BinarySearchResult::Found(idx) => {
                 let (_, _, r_ncjk, r_cjk) = r[idx];
                 if is_cjk { r_cjk } else { r_ncjk }
             }
-            slice::NotFound(_) => 1
+            slice::BinarySearchResult::NotFound(_) => 1
         }
     }
 
@@ -7160,11 +7160,11 @@ pub mod grapheme {
             else if hi < c { Less }
             else { Greater }
         }) {
-            slice::Found(idx) => {
+            slice::BinarySearchResult::Found(idx) => {
                 let (_, _, cat) = r[idx];
                 cat
             }
-            slice::NotFound(_) => GC_Any
+            slice::BinarySearchResult::NotFound(_) => GC_Any
         }
     }
 
diff --git a/src/libunicode/u_char.rs b/src/libunicode/u_char.rs
index 369336639a7..a73dac1a618 100644
--- a/src/libunicode/u_char.rs
+++ b/src/libunicode/u_char.rs
@@ -8,12 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-/*!
- * Unicode-intensive `char` methods.
- *
- * These methods implement functionality for `char` that requires knowledge of
- * Unicode definitions, including normalization, categorization, and display information.
- */
+//! Unicode-intensive `char` methods.
+//!
+//! These methods implement functionality for `char` that requires knowledge of
+//! Unicode definitions, including normalization, categorization, and display information.
 
 use core::option::Option;
 use tables::{derived_property, property, general_category, conversions, charwidth};
diff --git a/src/libunicode/u_str.rs b/src/libunicode/u_str.rs
index 03a50409d7e..a5f76142575 100644
--- a/src/libunicode/u_str.rs
+++ b/src/libunicode/u_str.rs
@@ -10,12 +10,10 @@
 //
 // ignore-lexer-test FIXME #15679
 
-/*!
- * Unicode-intensive string manipulations.
- *
- * This module provides functionality to `str` that requires the Unicode
- * methods provided by the UnicodeChar trait.
- */
+//! Unicode-intensive string manipulations.
+//!
+//! This module provides functionality to `str` that requires the Unicode methods provided by the
+//! UnicodeChar trait.
 
 use self::GraphemeState::*;
 use core::cmp;