summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2020-04-04 17:13:36 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2020-04-04 17:13:36 +0200
commitde9bc974a6b423b7f086af23e50c47a097dcd352 (patch)
tree9e362c5eaebf76b83727b40fecbf5cbc456665db /src
parentf0b3d5166ef1255fac880b146875ef46d2599a13 (diff)
downloadneco-de9bc974a6b423b7f086af23e50c47a097dcd352.tar
neco-de9bc974a6b423b7f086af23e50c47a097dcd352.zip
Minor cleanup, implement Debug, Display for CBox
Diffstat (limited to 'src')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 67d8baa..944b7ab 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -15,10 +15,11 @@ pub extern "C" fn main(_nargs: libc::c_int, _args: *const *const libc::c_char) -
let z = unsafe {
libc::boxed::CBox::slice_from_raw_parts(y, l)
};
- //let y = unsafe { c::string::CBox::from_raw(x) };
let foo = cstr!("Foo!\n");
stdout.puts(foo);
let _ = writeln!(stdout, "Foo: {} {} {}", z[0], z[1], z[2]);
+ let b = libc::boxed::CBox::new(42);
+ let _ = writeln!(stdout, "Bar: {}", b);
0
}