Pre: Move PushComputed up module hierarchy; make it public.
This commit is contained in:
parent
70c5bcfa99
commit
002c918c96
2 changed files with 17 additions and 14 deletions
|
@ -841,6 +841,18 @@ impl ConjoiningClauses {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait PushComputed {
|
||||
fn push_computed(&mut self, item: ComputedTable) -> DatomsTable;
|
||||
}
|
||||
|
||||
impl PushComputed for Vec<ComputedTable> {
|
||||
fn push_computed(&mut self, item: ComputedTable) -> DatomsTable {
|
||||
let next_index = self.len();
|
||||
self.push(item);
|
||||
DatomsTable::Computed(next_index)
|
||||
}
|
||||
}
|
||||
|
||||
// These are helpers that tests use to build Schema instances.
|
||||
#[cfg(test)]
|
||||
fn associate_ident(schema: &mut Schema, i: NamespacedKeyword, e: Entid) {
|
||||
|
|
|
@ -29,7 +29,10 @@ use mentat_query::{
|
|||
WhereClause,
|
||||
};
|
||||
|
||||
use clauses::ConjoiningClauses;
|
||||
use clauses::{
|
||||
ConjoiningClauses,
|
||||
PushComputed,
|
||||
};
|
||||
|
||||
use errors::{
|
||||
Result,
|
||||
|
@ -74,18 +77,6 @@ fn _simply_matches_value_place(left: &PatternValuePlace, right: &PatternValuePla
|
|||
}
|
||||
}
|
||||
|
||||
trait PushComputed {
|
||||
fn push_computed(&mut self, item: ComputedTable) -> DatomsTable;
|
||||
}
|
||||
|
||||
impl PushComputed for Vec<ComputedTable> {
|
||||
fn push_computed(&mut self, item: ComputedTable) -> DatomsTable {
|
||||
let next_index = self.len();
|
||||
self.push(item);
|
||||
DatomsTable::Computed(next_index)
|
||||
}
|
||||
}
|
||||
|
||||
pub enum DeconstructedOrJoin {
|
||||
KnownSuccess,
|
||||
KnownEmpty(EmptyBecause),
|
||||
|
|
Loading…
Reference in a new issue