|
5 | 5 | # code covering the core properties. Since this is a pretty rare event we
|
6 | 6 | # just store this out-of-line and check the unicode.rs file into git.
|
7 | 7 | #
|
8 |
| -# The emitted code is "the minimum we think is necessary for libcore", that |
| 8 | +# The emitted code is "the minimum we think is necessary for libstd", that |
9 | 9 | # is, to support basic operations of the compiler and "most nontrivial rust
|
10 | 10 | # programs". It is not meant to be a complete implementation of unicode.
|
11 | 11 | # For that we recommend you use a proper binding to libicu.
|
@@ -144,7 +144,7 @@ def emit_bsearch_range_table(f):
|
144 | 144 | use cmp::{Equal, Less, Greater};
|
145 | 145 | use vec::ImmutableVector;
|
146 | 146 | use option::None;
|
147 |
| - (do r.bsearch |&(lo,hi)| { |
| 147 | + r.bsearch(|&(lo,hi)| { |
148 | 148 | if lo <= c && c <= hi { Equal }
|
149 | 149 | else if hi < c { Less }
|
150 | 150 | else { Greater }
|
@@ -302,14 +302,14 @@ def emit_decomp_module(f, canon, compat, combine):
|
302 | 302 | ix += 1
|
303 | 303 | f.write("\n ];\n")
|
304 | 304 |
|
305 |
| - f.write(" pub fn canonical(c: char, i: &fn(char)) " |
| 305 | + f.write(" pub fn canonical(c: char, i: |char|) " |
306 | 306 | + "{ d(c, i, false); }\n\n")
|
307 |
| - f.write(" pub fn compatibility(c: char, i: &fn(char)) " |
| 307 | + f.write(" pub fn compatibility(c: char, i: |char|) " |
308 | 308 | +"{ d(c, i, true); }\n\n")
|
309 | 309 | f.write(" pub fn canonical_combining_class(c: char) -> u8 {\n"
|
310 | 310 | + " bsearch_range_value_table(c, combining_class_table)\n"
|
311 | 311 | + " }\n\n")
|
312 |
| - f.write(" fn d(c: char, i: &fn(char), k: bool) {\n") |
| 312 | + f.write(" fn d(c: char, i: |char|, k: bool) {\n") |
313 | 313 | f.write(" use iter::Iterator;\n");
|
314 | 314 |
|
315 | 315 | f.write(" if c <= '\\x7f' { i(c); return; }\n")
|
|
0 commit comments