experimentally make `RegistryKey` Send
This commit is contained in:
parent
fe35742026
commit
d43f8129f3
|
@ -1,6 +1,6 @@
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::os::raw::{c_int, c_void};
|
use std::os::raw::{c_int, c_void};
|
||||||
use std::rc::Rc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use ffi;
|
use ffi;
|
||||||
use error::Result;
|
use error::Result;
|
||||||
|
@ -18,17 +18,17 @@ pub struct LightUserData(pub *mut c_void);
|
||||||
|
|
||||||
// Clone-able id where every clone of the same id compares equal, and are guaranteed unique.
|
// Clone-able id where every clone of the same id compares equal, and are guaranteed unique.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub(crate) struct SharedId(Rc<()>);
|
pub(crate) struct SharedId(Arc<()>);
|
||||||
|
|
||||||
impl SharedId {
|
impl SharedId {
|
||||||
pub(crate) fn new() -> SharedId {
|
pub(crate) fn new() -> SharedId {
|
||||||
SharedId(Rc::new(()))
|
SharedId(Arc::new(()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PartialEq for SharedId {
|
impl PartialEq for SharedId {
|
||||||
fn eq(&self, other: &SharedId) -> bool {
|
fn eq(&self, other: &SharedId) -> bool {
|
||||||
Rc::ptr_eq(&self.0, &other.0)
|
Arc::ptr_eq(&self.0, &other.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue