From c731d625fe5f7626b41c7241893350b8b27b1dbe Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 10 Mar 2011 15:56:51 +0100 Subject: Add basic file-system functionality std.fs.list_dir will list the files in a directory, std.fs.file_is_dir will, given a pathname, determine whether it is a directory or not. --- src/rt/rust_util.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/rt/rust_util.h') diff --git a/src/rt/rust_util.h b/src/rt/rust_util.h index 03b7766d..5f13a3c8 100644 --- a/src/rt/rust_util.h +++ b/src/rt/rust_util.h @@ -177,11 +177,8 @@ rust_vec : public rc_base alloc(alloc), fill(fill) { - if (d || fill) { - I(dom, d); - I(dom, fill); + if (d) memcpy(&data[0], d, fill); - } } ~rust_vec() {} }; -- cgit v1.2.3