Skip to content

Commit f98ceaa

Browse files
committed
docs: explain why use a trait over a match
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent cc0cb59 commit f98ceaa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/tap-agent/src/test.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,11 @@ pub fn create_rav(
263263
.unwrap()
264264
}
265265

266+
/// Generic implementation of create_received_receipt
266267
pub trait CreateReceipt {
268+
/// This might seem weird at first glance since [Horizon] and [Legacy] implementation have the same
269+
/// function signature and don't require &self. The reason is that we can not match over T to get
270+
/// all variants because T is a trait and not an enum.
267271
fn create_received_receipt(
268272
allocation_id: Address,
269273
signer_wallet: &PrivateKeySigner,

0 commit comments

Comments
 (0)