summaryrefslogtreecommitdiff
path: root/src/context/tuple.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/context/tuple.rs')
-rw-r--r--src/context/tuple.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/context/tuple.rs b/src/context/tuple.rs
index 9bca72e..d2a1b0d 100644
--- a/src/context/tuple.rs
+++ b/src/context/tuple.rs
@@ -17,6 +17,9 @@ impl<'c, A, B, O> LockingTuple<'c, A, B, O> {
}
}
+// Some day I need to invent variadic generics for Rust to make this easier for
+// myself
+
macro_rules! lock_impl {
($self: expr, $field: tt) => {
unsafe {
@@ -158,6 +161,10 @@ macro_rules! recurse_iter_impl {
};
}
+// I created these types to help reduce the complexity of the method return
+// types. But now I've added so much functionality that these types are just as
+// complicates. Oh well.
+
type LockReturn<'a, 'context, Guarded, L, C, O> = (
ContextGuard<'a, <Guarded as Lockable>::Guard<'a>, ThreadKey>,
LockingTuple<'context, L, C, O>,
@@ -185,6 +192,7 @@ type RecurseIterReturn<'context, Inner, L, C, O> = LockingIterator<
impl<T, C, Outer> LockingTuple<'_, T, C, Outer> {
/// Exit out of the current scope of the locking tuple into the parent.
+ // Luckily, this only needs one implementation
pub fn exit(self) -> Outer {
self.outer
}