Skip to content

Commit be35893

Browse files
committed
core: Implement str::escape with str::chars_iter.
1 parent 1a7aa20 commit be35893

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ Escapes special characters inside the string, making it safe for transfer.
688688
*/
689689
fn escape(s: str) -> str {
690690
let r = "";
691-
all(s, { |c| r += escape_char(c); true });
691+
chars_iter(s) { |c| r += escape_char(c) };
692692
r
693693
}
694694

0 commit comments

Comments
 (0)