Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f49babb7 authored by Martin Geisler's avatar Martin Geisler
Browse files

pdl: Use num-traits in canonical tests

The FromPrimitive and ToPrimitive traits allow us to be generic over
the value types in the canonical tests.

This is helpful when we introduce support for enums: there we will
need to convert to/from non-integer types and we will have to do so
without knowing the actual type when we generate the code. The traits
allow us to do so in a generic way.

Test: atest pdl_rust_generator_tests_{le,be}
Change-Id: I11542ff298d924a0f6d0492445267c9efe37ace8
parent 836b4342
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment