Skip to content

Conversation

damirka
Copy link
Contributor

@damirka damirka commented Aug 1, 2022

No description provided.

@damirka damirka added Type: Documentation Improvements or additions to documentation move labels Aug 1, 2022
@damirka damirka requested a review from sblackshear August 1, 2022 14:31
@damirka damirka self-assigned this Aug 1, 2022
/// Payable receipt. Has to be paid directly or paid with a trade-in option.
/// Cannot be stored, owned or dropped - has to be used to select one of the
/// options for payment: `trade_in` or `pay_full`.
struct Receipt { price: u64 }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this remember the ID of the Phone it was used to purchase?

In this particular code, it's probably harmless to mix/match phones and receipts, but I can imagine a lot of cases where you would not want to allow this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't figure out a way to check for ID as phone is never passed afterwards. Merging this in to have this example in the book.

@Clay-Mysten Clay-Mysten requested a review from lxfind August 2, 2022 16:02
@Clay-Mysten
Copy link
Contributor

Adding @lxfind so he sees the examples growing.

@damirka damirka force-pushed the ds/examples-hot-potato branch from f19d299 to 631ef78 Compare August 16, 2022 12:22
@damirka damirka enabled auto-merge (squash) August 16, 2022 12:23
@damirka damirka merged commit e809093 into main Aug 16, 2022
@damirka damirka deleted the ds/examples-hot-potato branch August 16, 2022 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
move Type: Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants