We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74d60a6 commit c60a6b9Copy full SHA for c60a6b9
src/libcore/io.rs
@@ -371,10 +371,8 @@ impl of writer for *libc::FILE {
371
fn flush() -> int { libc::fflush(self) as int }
372
fn get_type() -> writer_type {
373
let fd = libc::fileno(self);
374
- if libc::isatty(fd) == 0 {
375
- ret file;
376
- }
377
- ret screen;
+ if libc::isatty(fd) == 0 { file }
+ else { screen }
378
}
379
380
@@ -661,7 +659,7 @@ impl of writer for mem_buffer {
661
659
662
660
fn tell() -> uint { self.pos }
663
fn flush() -> int { 0 }
664
- fn get_type() -> writer_type { ret file }
+ fn get_type() -> writer_type { file }
665
666
667
fn mem_buffer() -> mem_buffer {
0 commit comments