synek317 / synonym

Another try to simplify newtype creation in rust
MIT License
13 stars 1 forks source link

Provide `.value()` method for `Synonym` types #6

Closed umut-sahin closed 2 months ago

umut-sahin commented 2 months ago

I'm aware that Deref is implemented and I can just use *max_health or make the field pub and use max_health.0, but I find max_health.value() to be more readable in some cases, so it'd be nice to have.

synek317 commented 2 months ago

Closed in https://github.com/synek317/synonym/commit/fb872ffe2d6aac8cad9e25ae7c6f72fdf6e2ad5f. Thanks for reporting this idea!