@@ -7,12 +7,14 @@
extern crate alloc;
extern crate smallvec;
+
+pub use cursor::*;
+pub use entry::*;
+pub use mark::*;
+pub use xarray::*;
use cow::*;
-use cursor::*;
-use entry::*;
-use mark::*;
use node::*;
-pub use xarray::*;
mod cow;
mod cursor;
@@ -47,9 +49,5 @@ mod std_specific {
}
- pub struct StdMutex;
-
- impl XLock for StdMutex {
- type Lock<T> = Mutex<T>;
- }
+ abstract_lock_to!(Mutex, StdMutex);
@@ -236,6 +236,17 @@ pub trait XLock {
+#[macro_export]
+macro_rules! abstract_lock_to {
+ ($lock_type:ident, $name:ident) => {
+ pub struct $name;
+ impl XLock for $name {
+ type Lock<T> = $lock_type<T>;
+ }
+ };
+}
pub struct Range<'a, I, L, M>
where
I: ItemEntry,