Skip to content

Commit

Permalink
restrict Sync/Send for Intern<T> (closes #20)
Browse files Browse the repository at this point in the history
  • Loading branch information
droundy committed Mar 4, 2021
1 parent 863dbc0 commit 2928a87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ impl<T> Clone for Intern<T> {
/// because we never free the data pointed to by an `Intern`.
impl<T> Copy for Intern<T> {}

unsafe impl<T> Send for Intern<T> {}
unsafe impl<T> Sync for Intern<T> {}
unsafe impl<T: Send> Send for Intern<T> {}
unsafe impl<T: Sync> Sync for Intern<T> {}

impl<T: Eq + Hash + Send + 'static> Intern<T> {
fn get_mutex() -> &'static Mutex<HashSet<Box<T>>> {
Expand Down

0 comments on commit 2928a87

Please sign in to comment.