Some more obj dtor reformatting

This commit is contained in:
Marijn Haverbeke 2011-07-27 17:05:34 +02:00
parent edd1a0230e
commit 8365a79c7c
2 changed files with 8 additions and 4 deletions

View file

@ -71,7 +71,8 @@ obj FILE_buf_reader(f: os::libc::FILE, must_close: bool) {
}
fn tell() -> uint {
ret os::libc::ftell(f) as uint;
}drop { if must_close { os::libc::fclose(f); } }
}
drop { if must_close { os::libc::fclose(f); } }
}
@ -251,7 +252,8 @@ obj FILE_writer(f: os::libc::FILE, must_close: bool) {
}
fn tell() -> uint {
ret os::libc::ftell(f) as uint;
}drop { if must_close { os::libc::fclose(f); } }
}
drop { if must_close { os::libc::fclose(f); } }
}
obj fd_buf_writer(fd: int, must_close: bool) {
@ -277,7 +279,8 @@ obj fd_buf_writer(fd: int, must_close: bool) {
fn tell() -> uint {
log_err "need 64-bit native calls for tell, sorry";
fail;
}drop { if must_close { os::libc::close(fd); } }
}
drop { if must_close { os::libc::close(fd); } }
}
fn file_buf_writer(path: str, flags: &fileflag[]) -> buf_writer {

View file

@ -20,7 +20,8 @@ fn mk_rng() -> rng {
obj rt_rng(c: rustrt::rctx) {
fn next() -> u32 {
ret rustrt::rand_next(c);
}drop { rustrt::rand_free(c); }
}
drop { rustrt::rand_free(c); }
}
ret rt_rng(rustrt::rand_new());
}