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

Add support for more packages pt1 #19

Closed pmnoxx closed 2 years ago

pmnoxx commented 2 years ago

It may be a good idea to add support for more structures from std.

Aeledfyr commented 2 years ago

As mentioned in the previous PR, this could be cleaned up by using the known_deep_size macro, since these are all constant-size.

For example, see the implementation for chrono: https://github.com/Aeledfyr/deepsize/blob/23065db143811324ada5aeb87bc4410cf832c6a5/src/external_impls.rs#L167-L172

pmnoxx commented 2 years ago

As mentioned in the previous PR, this could be cleaned up by using the known_deep_size macro, since these are all constant-size.

For example, see the implementation for chrono:

https://github.com/Aeledfyr/deepsize/blob/23065db143811324ada5aeb87bc4410cf832c6a5/src/external_impls.rs#L167-L172

@Aeledfyr Thanks, I updated the PR.

Aeledfyr commented 2 years ago

Looks good! Merging.