Skip to content

Commit 5f35a35

Browse files
authored
Merge pull request #512 from camelid/unit-update
Impl `Update` for unit type `()`
2 parents 0186e66 + c4af8d0 commit 5f35a35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/update.rs

+2
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ macro_rules! tuple_impl {
337337
let ($($t,)*) = new_value;
338338
let ($($u,)*) = unsafe { &mut *old_pointer };
339339

340+
#[allow(unused_mut)]
340341
let mut changed = false;
341342
$(
342343
unsafe { changed |= Update::maybe_update($u, $t); }
@@ -348,6 +349,7 @@ macro_rules! tuple_impl {
348349
}
349350

350351
// Create implementations for tuples up to arity 12
352+
tuple_impl!(;);
351353
tuple_impl!(A; a);
352354
tuple_impl!(A, B; a, b);
353355
tuple_impl!(A, B, C; a, b, c);

0 commit comments

Comments
 (0)