Skip to content

Commit

Permalink
Don't add ill-advised API
Browse files Browse the repository at this point in the history
  • Loading branch information
kazimuth committed Jul 20, 2023
1 parent 8718a39 commit 9f86adb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions crates/core/src/db/datastore/locking_tx_datastore/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ impl DataRef {
pub fn view(&self) -> &ProductValue {
&self.data
}

pub fn consume(self) -> ProductValue {
self.data
}
}

pub struct MutTxId {
Expand Down
3 changes: 1 addition & 2 deletions crates/core/src/host/instance_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ impl InstanceEnv {
let relational_db = self.dbic.relational_db.clone();
let tx = self.tx.clone();

// An alternative
let generator = gen!({
let stdb = &*relational_db;
let mut tx = &mut *tx.get()?;
Expand All @@ -408,7 +407,7 @@ impl InstanceEnv {
yield_!(IterItem::Header(schema));

for row in stdb.iter(tx, table_id)? {
yield_!(IterItem::Row(row.consume()));
yield_!(IterItem::Row(row.view().clone()));
}

Ok(())
Expand Down

0 comments on commit 9f86adb

Please sign in to comment.