complete version
This commit is contained in:
10
box-str-dhat/Cargo.toml
Normal file
10
box-str-dhat/Cargo.toml
Normal file
@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "box-str-dhat"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
dhat = "0.3.0"
|
||||
|
||||
[features]
|
||||
dhat-heap = [] # if you are doing heap profiling
|
10
box-str-dhat/src/main.rs
Normal file
10
box-str-dhat/src/main.rs
Normal file
@ -0,0 +1,10 @@
|
||||
#[global_allocator]
|
||||
static ALLOC: dhat::Alloc = dhat::Alloc;
|
||||
|
||||
fn main() {
|
||||
let _profiler = dhat::Profiler::new_heap();
|
||||
|
||||
let boxed_str: Box<str> = "hello".into();
|
||||
|
||||
println!("boxed_str: {}", boxed_str);
|
||||
}
|
Reference in New Issue
Block a user