Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
use std::marker::PhantomData;
use std::panic::RefUnwindSafe;

use crate::database::RawDatabase;
use crate::sync::{Arc, Condvar, Mutex};
use crate::zalsa::{ErasedJar, HasJar, Zalsa, ZalsaDatabase};
use crate::zalsa_local::{self, ZalsaLocal};
Expand Down Expand Up @@ -75,7 +74,7 @@ impl<Db: Database> StorageHandle<Db> {
///
/// The `storage` and `storage_mut` fields must both return a reference to the same
/// storage field which must be owned by `self`.
pub unsafe trait HasStorage: Database + Clone + Sized {
pub unsafe trait HasStorage: Database + Sized {
fn storage(&self) -> &Storage<Self>;
fn storage_mut(&mut self) -> &mut Storage<Self>;
}
Expand Down Expand Up @@ -244,11 +243,6 @@ unsafe impl<T: HasStorage> ZalsaDatabase for T {
fn zalsa_local(&self) -> &ZalsaLocal {
&self.storage().zalsa_local
}

#[inline(always)]
fn fork_db(&self) -> RawDatabase<'static> {
Box::leak(Box::new(self.clone())).into()
}
}

impl<Db: Database> Clone for Storage<Db> {
Expand Down
5 changes: 0 additions & 5 deletions src/zalsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::panic::RefUnwindSafe;
use hashbrown::HashMap;
use rustc_hash::FxHashMap;

use crate::database::RawDatabase;
use crate::hash::TypeIdHasher;
use crate::ingredient::{Ingredient, Jar};
use crate::plumbing::SalsaStructInDb;
Expand Down Expand Up @@ -50,10 +49,6 @@ pub unsafe trait ZalsaDatabase: Any {
/// Access the thread-local state associated with this database
#[doc(hidden)]
fn zalsa_local(&self) -> &ZalsaLocal;

/// Clone the database.
#[doc(hidden)]
fn fork_db(&self) -> RawDatabase<'static>;
}

pub fn views<Db: ?Sized + Database>(db: &Db) -> &Views {
Expand Down