chore: mv smartstring

This commit is contained in:
2020-10-01 07:58:29 +08:00
parent e987a9de3b
commit d5414661fc
4 changed files with 0 additions and 0 deletions

11
smartstring/src/main.rs Normal file
View File

@@ -0,0 +1,11 @@
use smartstring::{Compact, SmartString};
use std::mem::size_of_val;
fn main() {
let smart = SmartString::<Compact>::from("hello world");
dbg!(size_of_val(&smart));
let stand = String::from("hello world");
dbg!(size_of_val(&stand));
dbg!(size_of_val(&stand) + stand.capacity());
}