Skip to content

Commit

Permalink
Merge pull request #442 from ratmice/conditional_final_state
Browse files Browse the repository at this point in the history
(lrtable) Make the final_state field conditional on `cfg(test)`
  • Loading branch information
ltratt authored Mar 6, 2024
2 parents b5abf08 + 29c8399 commit a7e700b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lrtable/src/lib/statetable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ pub struct StateTable<StorageT> {
prods_len: PIdx<StorageT>,
tokens_len: TIdx<StorageT>,
conflicts: Option<Conflicts<StorageT>>,
#[cfg(test)]
final_state: StIdx<StorageT>,
}

Expand Down Expand Up @@ -370,6 +371,7 @@ where
prods_len: grm.prods_len(),
tokens_len: grm.tokens_len(),
conflicts,
#[cfg(test)]
final_state: final_state.unwrap(),
})
}
Expand Down

0 comments on commit a7e700b

Please sign in to comment.