mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
Fix OneThread
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
use std::fmt::Debug;
|
||||
use std::fmt::Formatter;
|
||||
use std::fmt;
|
||||
use std;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use owning_ref::{Erased, OwningRef};
|
||||
|
||||
@@ -200,6 +199,7 @@ pub fn take(&self) -> Option<T> {
|
||||
use parking_lot::Mutex as InnerLock;
|
||||
use parking_lot::RwLock as InnerRwLock;
|
||||
|
||||
use std;
|
||||
use std::thread;
|
||||
pub use rayon::{join, scope};
|
||||
|
||||
@@ -638,7 +638,9 @@ pub struct OneThread<T> {
|
||||
inner: T,
|
||||
}
|
||||
|
||||
#[cfg(parallel_queries)]
|
||||
unsafe impl<T> std::marker::Sync for OneThread<T> {}
|
||||
#[cfg(parallel_queries)]
|
||||
unsafe impl<T> std::marker::Send for OneThread<T> {}
|
||||
|
||||
impl<T> OneThread<T> {
|
||||
|
||||
Reference in New Issue
Block a user