From 0a6bd8f2c0a7c79d17f5dc9e64af0b4c6c745166 Mon Sep 17 00:00:00 2001 From: Mica White Date: Wed, 26 Aug 2026 21:03:22 -0400 Subject: Comments --- src/context/tuple.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/context/tuple.rs') 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, ::Guard<'a>, ThreadKey>, LockingTuple<'context, L, C, O>, @@ -185,6 +192,7 @@ type RecurseIterReturn<'context, Inner, L, C, O> = LockingIterator< impl 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 } -- cgit v1.3.1