Skip to content

Commit 69ffb4e

Browse files
killerswannikomatsakis
authored andcommitted
s/fn&/fn/
1 parent 8f4d1f3 commit 69ffb4e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/libcore/str.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ Iterate over the characters in a string
376376
377377
FIXME: A synonym to iter_chars
378378
*/
379-
fn chars_iter(ss: str, it: fn&(char)) {
379+
fn chars_iter(ss: str, it: fn(char)) {
380380
iter_chars(ss, it)
381381
}
382382

@@ -387,7 +387,7 @@ Iterate over the bytes in a string
387387
388388
FIXME: Should it really include the last byte '\0'?
389389
*/
390-
fn bytes_iter(ss: str, it: fn&(u8)) {
390+
fn bytes_iter(ss: str, it: fn(u8)) {
391391
let pos = 0u;
392392
let len = byte_len(ss);
393393

@@ -866,7 +866,7 @@ Splits a string into substrings using a function
866866
867867
FIXME: will be renamed to split.
868868
*/
869-
fn split_func(ss: str, sepfn: fn&(cc: char)->bool) -> [str] {
869+
fn split_func(ss: str, sepfn: fn(cc: char)->bool) -> [str] {
870870
let vv: [str] = [];
871871
let accum: str = "";
872872
let ends_with_sep: bool = false;
@@ -933,7 +933,7 @@ Function: words_iter
933933
934934
Apply a function to each word
935935
*/
936-
fn words_iter(ss: str, ff: fn&(&&str)) {
936+
fn words_iter(ss: str, ff: fn(&&str)) {
937937
vec::iter(words(ss), ff)
938938
}
939939

@@ -942,7 +942,7 @@ Function: lines_iter
942942
943943
Apply a function to each lines (by '\n')
944944
*/
945-
fn lines_iter(ss: str, ff: fn&(&&str)) {
945+
fn lines_iter(ss: str, ff: fn(&&str)) {
946946
vec::iter(lines(ss), ff)
947947
}
948948

@@ -1180,7 +1180,7 @@ if the string contains no characters
11801180
11811181
// FIXME: a synonym to loop_chars
11821182
*/
1183-
fn all(ss: str, ff: fn&(char) -> bool) -> bool {
1183+
fn all(ss: str, ff: fn(char) -> bool) -> bool {
11841184
str::loop_chars(ss, ff)
11851185
}
11861186

@@ -1190,7 +1190,7 @@ Function: any
11901190
Return true if a predicate matches any character
11911191
(and false if it matches none or there are no characters)
11921192
*/
1193-
fn any(ss: str, pred: fn&(char) -> bool) -> bool {
1193+
fn any(ss: str, pred: fn(char) -> bool) -> bool {
11941194
!all(ss, {|cc| !pred(cc)})
11951195
}
11961196

@@ -1199,7 +1199,7 @@ Function: map
11991199
12001200
Apply a function to each character
12011201
*/
1202-
fn map(ss: str, ff: fn&(char) -> char) -> str {
1202+
fn map(ss: str, ff: fn(char) -> char) -> str {
12031203
let result = "";
12041204

12051205
str::iter_chars(ss, {|cc|

0 commit comments

Comments
 (0)