pdl: Use explicit type when converting enum value
This fixes a compilation error when I compile the generated code locally while having the Serde feature enabled: error[E0283]: type annotations needed --> tests/le/mod.rs:1488:45 | 1488 | if (chunk & 0x7f) as u8 != Enum7::A.into() { | -- ^^^^ | | | type must be known at this point | = note: multiple `impl`s satisfying `u8: PartialEq<_>` found in the following crates: `core`, `serde_json`: - impl PartialEq for u8; - impl PartialEq<Value> for u8; Tag: #feature Bug: 228306436 Test: atest pdl_tests pdl_rust_generator_tests_{le,be} pdl_generated_files_compile (cherry picked from https://android-review.googlesource.com/q/commit:0edd07378446075a2c17ab355393747560fd3813) Merged-In: I01e0ed4bcb3117005453d92299e586ba1913bc3d Change-Id: I01e0ed4bcb3117005453d92299e586ba1913bc3d
Loading
Please register or sign in to comment