Groups
Groups
Sign in
Groups
Groups
Rust по-русски
Conversations
About
Send feedback
Help
Замена std::old_io::stdio::{set_stdout, set_stderr}?
39 views
Skip to first unread message
Andrey Lesnikov
unread,
Apr 27, 2015, 3:03:01 AM
4/27/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rust-r...@googlegroups.com
В old_io были функции std::old_io::stdio::set_stdout и std::old_io::stdio::set_stderr. В новом io они тоже есть (
https://github.com/rust-lang/rust/blob/e3d00a4/src/libstd/io/stdio.rs#L381-L401
), но переименованы в set_print/set_panic, скрыты из документации и используются только в libtest'е (
https://github.com/rust-lang/rust/blob/c0eb93/src/libtest/lib.rs#L930-L931
). Так что, возможно, жить им не долго осталось.
Мне это нужно для вывода stdout и stderr в logcat для android-rs-glue (
https://github.com/tomaka/android-rs-glue/blob/fa1eaa/glue/src/lib.rs#L223-L224
), что бы свой
https://github.com/ozkriff/zoc
под андроидом было проще отлаживать.
Вооот, и я не вижу другого способа реализовать ту же функциональность с новым io. Может я чего проглядел?
Reply all
Reply to author
Forward
0 new messages