mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-10 10:44:22 +01:00
Added 'static bounds to T
This commit is contained in:
@@ -13,7 +13,7 @@ pub struct ScanCursor<'a, Clock: LogicalClock, T: Sync + Send + Clone + Serializ
|
||||
tx_id: u64,
|
||||
}
|
||||
|
||||
impl<'a, Clock: LogicalClock, T: Sync + Send + Clone + Serialize + DeserializeOwned + Debug> ScanCursor<'a, Clock, T> {
|
||||
impl<'a, Clock: LogicalClock, T: Sync + Send + Clone + Serialize + DeserializeOwned + Debug + 'static> ScanCursor<'a, Clock, T> {
|
||||
pub fn new(
|
||||
db: &'a Database<Clock, T>,
|
||||
tx_id: u64,
|
||||
|
||||
@@ -267,10 +267,8 @@ pub struct Database<
|
||||
storage: Storage,
|
||||
}
|
||||
|
||||
impl<
|
||||
Clock: LogicalClock,
|
||||
T: Sync + Send + Clone + Serialize + Debug + DeserializeOwned,
|
||||
> Database<Clock, T>
|
||||
impl<Clock: LogicalClock, T: Sync + Send + Clone + Serialize + Debug + DeserializeOwned + 'static>
|
||||
Database<Clock, T>
|
||||
{
|
||||
/// Creates a new database.
|
||||
pub fn new(clock: Clock, storage: Storage) -> Self {
|
||||
@@ -680,8 +678,7 @@ impl<
|
||||
let mut row_versions = row_versions.value().write().unwrap();
|
||||
row_versions.retain(|rv| rv.begin != TxTimestampOrID::TxID(tx_id));
|
||||
if row_versions.is_empty() {
|
||||
// !TODO! FIXME! This is a bug, because we can't remove the row here!
|
||||
// self.rows.remove(id);
|
||||
self.rows.remove(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -757,8 +754,7 @@ impl<
|
||||
}
|
||||
}
|
||||
for id in to_remove {
|
||||
// !TODO! FIXME! This is a bug, because we can't remove the row here!
|
||||
// self.rows.remove(&id);
|
||||
self.rows.remove(&id);
|
||||
}
|
||||
dropped
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user