Skip to content

Commit e9ab9bf

Browse files
committed
Update unicode.py to reflect language changes
1 parent e147a09 commit e9ab9bf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/etc/unicode.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# code covering the core properties. Since this is a pretty rare event we
66
# just store this out-of-line and check the unicode.rs file into git.
77
#
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
99
# is, to support basic operations of the compiler and "most nontrivial rust
1010
# programs". It is not meant to be a complete implementation of unicode.
1111
# For that we recommend you use a proper binding to libicu.
@@ -144,7 +144,7 @@ def emit_bsearch_range_table(f):
144144
use cmp::{Equal, Less, Greater};
145145
use vec::ImmutableVector;
146146
use option::None;
147-
(do r.bsearch |&(lo,hi)| {
147+
r.bsearch(|&(lo,hi)| {
148148
if lo <= c && c <= hi { Equal }
149149
else if hi < c { Less }
150150
else { Greater }
@@ -302,14 +302,14 @@ def emit_decomp_module(f, canon, compat, combine):
302302
ix += 1
303303
f.write("\n ];\n")
304304

305-
f.write(" pub fn canonical(c: char, i: &fn(char)) "
305+
f.write(" pub fn canonical(c: char, i: |char|) "
306306
+ "{ 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|) "
308308
+"{ d(c, i, true); }\n\n")
309309
f.write(" pub fn canonical_combining_class(c: char) -> u8 {\n"
310310
+ " bsearch_range_value_table(c, combining_class_table)\n"
311311
+ " }\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")
313313
f.write(" use iter::Iterator;\n");
314314

315315
f.write(" if c <= '\\x7f' { i(c); return; }\n")

0 commit comments

Comments
 (0)