-
Notifications
You must be signed in to change notification settings - Fork 477
Description
Newtypes allow to constrain what operations make sense on a value in order to prevent mistakes.
Please consider whether providing a newtype for the ResourceSize type alias would make sense and what operations could be provided for it -- please see #1198 for a similar thread about Offset.
At the time of writing, the patches would need to be based on top of that patch series.
Please take the chance as well to write a couple examples/tests for the newtype.
Related: #1204.
Lore: https://lore.kernel.org/rust-for-linux/CANiq72maV_j1uV=2nPGbTgRabnk8cpc7TNN_FQ+ou52OpZ=k6Q@mail.gmail.com/.
This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes (including generating the documentation if changed, running the Rust doctests if changed, etc.), to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and to add a Suggested-by: tag, and a Link: tag to this issue. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.