Add a print and println to std::io
This commit is contained in:
parent
5950ae3c0e
commit
3cabe7429f
1 changed files with 3 additions and 0 deletions
|
@ -384,6 +384,9 @@ fn buffered_file_buf_writer(path: str) -> buf_writer {
|
|||
fn stdout() -> writer { ret new_writer(fd_buf_writer(1, option::none)); }
|
||||
fn stderr() -> writer { ret new_writer(fd_buf_writer(2, option::none)); }
|
||||
|
||||
fn print(s: str) { stdout().write_str(s); }
|
||||
fn println(s: str) { stdout().write_str(s + "\n"); }
|
||||
|
||||
type str_writer =
|
||||
obj {
|
||||
fn get_writer() -> writer;
|
||||
|
|
Loading…
Reference in a new issue