CasperLabs / datasize-rs

Heap memory usage estimation
Other
17 stars 13 forks source link

use qualified path for derivation #20

Closed BugenZhao closed 9 months ago

BugenZhao commented 9 months ago

Hi and thanks for your work!

I find the derived code assuming that the trait DataSize is already imported into the current scope. This is not a big deal but when I'm going to derive DataSize in generated protobuf code (with prost), I find no way to include the statement use datasize::DataSize;, especially for the nested modules.

So I guess the best way to resolve this issue is to use qualified path everywhere in the derived code.

BugenZhao commented 8 months ago

My pleasure. BTW, would you mind drafting a new patch release on crates.io?