Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/salsa/src/runtime/local_state.rs')
| -rw-r--r-- | crates/salsa/src/runtime/local_state.rs | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/crates/salsa/src/runtime/local_state.rs b/crates/salsa/src/runtime/local_state.rs index 0dbea1d563..7386967188 100644 --- a/crates/salsa/src/runtime/local_state.rs +++ b/crates/salsa/src/runtime/local_state.rs @@ -34,21 +34,13 @@ pub(crate) struct QueryRevisions { /// Minimum durability of the inputs to this query. pub(crate) durability: Durability, - /// The inputs that went into our query, if we are tracking them. - pub(crate) inputs: QueryInputs, -} - -/// Every input. -#[derive(Debug, Clone)] -pub(crate) enum QueryInputs { - /// Non-empty set of inputs, fully known - Tracked { inputs: ThinArc<(), DatabaseKeyIndex> }, - - /// Empty set of inputs, fully known. - NoInputs, + /// Whether the input is untracked. + /// Invariant: if `untracked`, `inputs` is `None`. + /// Why is this encoded like this and not a proper enum? Struct size, this saves us 8 bytes. + pub(crate) untracked: bool, - /// Unknown quantity of inputs - Untracked, + /// The inputs that went into our query, if we are tracking them. + pub(crate) inputs: Option<ThinArc<(), DatabaseKeyIndex>>, } impl Default for LocalState { |