docs.rs docs patch: token_program override example #2918
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been working with interfaces recently and this example was very confusing.
Updated imports to imports from
anchor_spl::token_interface
I removed Box<> because docs.rs currently displays them incorrectly for some reason:
Boxing accs here isn't necessary for educational purposes of this example, and hopefully removing them will fix what docs.rs builds.
Attaching link to this example on docs.rs so u could see how confusing it is right now:
https://docs.rs/anchor-lang/latest/anchor_lang/derive.Accounts.html#:~:text=%23%5Baccount(*%3A%3Atoken_program%20%3D%20%3Ctarget_account%3E)%5D