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

Use const generics for arrays #16

Closed miguelfrde closed 2 years ago

miguelfrde commented 3 years ago

This allows to support more sizes than the predefined ones.

Some of the changes are unrelated and are were done by cargo fmt. If you'd like to have those come in a separate commit, happy to split them off.

Aeledfyr commented 2 years ago

Besides for the error with the added test, this looks good. Is bumping the MSRV to 1.51 to support const-generics problematic?

matklad commented 2 years ago

I think bumping MSRV would be a good idea: today this crate doesn’t have a lot of usages yet, so it make sense to latch onto the newer rust while we can.