Skip to content

Commit

Permalink
Add docs to combine macro
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharding committed Jan 10, 2024
1 parent 8efc290 commit 8f6e9df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// SPDX-License-Identifier: CC0-1.0

/// Combines the given `$thing` field of two types by setting `self.thing` to be
/// the value in `other.thing` iff `self.thing` is currently empty.
///
/// If `self.thing` already contains a value then this macro does nothing.
#[allow(unused_macros)]
macro_rules! combine {
($thing:ident, $slf:ident, $other:ident) => {
Expand Down

0 comments on commit 8f6e9df

Please sign in to comment.