Aeledfyr / deepsize

A rust crate to find the total size of an object, on the stack and on the heap
MIT License
103 stars 19 forks source link

fix example code in readme #15

Closed qy3u closed 2 years ago

qy3u commented 3 years ago

Hi.Thanks for writting this great crate.After copy-paste-run the code in the readme, I got the error message blow:

b: Box::new(b"Hello, Wold!"),
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice `[u8]`, found `&[u8; 12]`
   |

so I just fix this error.Besides that, I also import std::mem::size_of in the example code. Whether to adopt the latter is up to you,but i think former should be fixed : )

Aeledfyr commented 2 years ago

Sorry for not keeping up with this repository. Thank you for the fix!