complete version

This commit is contained in:
2022-06-17 13:42:33 +01:00
parent 7e9e16690e
commit 3d2a9c67e7
17 changed files with 205 additions and 44 deletions

View File

@ -0,0 +1,10 @@
[package]
name = "box-str-program"
version = "0.1.0"
edition = "2021"
[dependencies]
dhat = "0.3.0"
[features]
dhat-heap = [] # if you are doing heap profiling

View File

@ -0,0 +1,6 @@
fn main() {
let boxed_str: Box<str> = "hello".into();
println!("boxed_str: {}", boxed_str);
println!("size of boxed_str on stack: {}", std::mem::size_of_val(&boxed_str));
}