softdevteam / grmtools

Rust grammar tool libraries and binaries
Other
494 stars 32 forks source link

(lrtable) Make the final_state field conditional on `cfg(test)` #442

Closed ratmice closed 4 months ago

ratmice commented 4 months ago

This conditionally includes a field into struct StateTable. Previously clippy with --no-default-features -p lrtable would produce a warning about final_state never being read. This was presumably being suppressed by serde derive macros. Since this field was only used in the test cfg.

It seemed better to make it conditional rather than #[allow(dead_code)].

ltratt commented 4 months ago

Thanks!