mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Some more obj dtor reformatting
This commit is contained in:
+6
-3
@@ -71,7 +71,8 @@ fn seek(offset: int, whence: seek_style) {
|
||||
}
|
||||
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 @@ fn seek(offset: int, whence: seek_style) {
|
||||
}
|
||||
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 @@ fn seek(offset: int, whence: seek_style) {
|
||||
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 {
|
||||
|
||||
+2
-1
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user