diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-07-19 14:37:20 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-07-19 14:37:27 -0700 |
| commit | 1e13626caa058cec34ec643ff375355aec6ef151 (patch) | |
| tree | 13411c206e055d527a8b60ff3cc397a332efb487 | |
| parent | bc03121d7e6491256651e91c843f05934f312e0c (diff) | |
| download | rust-1e13626caa058cec34ec643ff375355aec6ef151.tar.gz rust-1e13626caa058cec34ec643ff375355aec6ef151.zip | |
Switch io::print and io::println to take slices.
| -rw-r--r-- | src/libcore/io.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/io.rs b/src/libcore/io.rs index cb4b94b8286..659fdbc6d7e 100644 --- a/src/libcore/io.rs +++ b/src/libcore/io.rs @@ -599,8 +599,8 @@ fn buffered_file_writer(path: ~str) -> result<writer, ~str> { fn stdout() -> writer { fd_writer(libc::STDOUT_FILENO as c_int, false) } fn stderr() -> writer { fd_writer(libc::STDERR_FILENO as c_int, false) } -fn print(s: ~str) { stdout().write_str(s); } -fn println(s: ~str) { stdout().write_line(s); } +fn print(s: &str) { stdout().write_str(s); } +fn println(s: &str) { stdout().write_line(s); } type mem_buffer = @{buf: dvec<u8>, mut pos: uint}; |
