From daca0e6b68d32d885face00d68df5b5cb00e098b Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 21 Feb 2025 16:15:29 +0200 Subject: Remove polymorphism from DB, replace with From based approach --- log_db/src/row.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'log_db/src/row.rs') diff --git a/log_db/src/row.rs b/log_db/src/row.rs index 5ebb069..d8140d2 100644 --- a/log_db/src/row.rs +++ b/log_db/src/row.rs @@ -37,17 +37,6 @@ impl Row { } Row { values, tombstone } } - - pub fn from(values: &[Value]) -> Row { - Row { - values: values.to_vec(), - tombstone: false, - } - } - - pub fn at(&self, index: usize) -> &Value { - &self.values[index] - } } #[cfg(test)] @@ -76,6 +65,6 @@ mod tests { #[derive(Clone, Debug)] pub enum TxEntry { - Upsert { record: Row }, - Delete { record: Row }, + Upsert { row: Row }, + Delete { row: Row }, } -- cgit v1.3