docs(course_access): complete save_user_profile docstring with Returns section#239
Open
Divine-designs wants to merge 1 commit into
Open
Conversation
…s section Closes SkillCert#206. Brings `save_user_profile` docstring in line with the template requested in the issue: description, Arguments, and Returns. The existing docstring was missing the `# Returns` section and did not explain the side effects (persistent storage write + saveUsPrl event emission) or the failure mode (empty off_chain_ref_id halts execution via handle_error). All three are now documented. `save_user_profile` is the only public function in the file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Brings the docstring of
save_user_profileincontracts/course/course_access/src/functions/save_profile.rsin line with the template requested in #206.Changes
The existing docstring already had a brief description and
# Arguments, but was missing the# Returnssection required by the template, and did not call out:DataKey::UserProfile(user)saveUsPrlevent emission carrying(user, off_chain_ref_id)off_chain_ref_idtriggershandle_error(&env, Error::OffChainRefIdRequired))All three are now documented, and the docstring matches the issue's template:
save_user_profileis the only public function in the file, so the issue's scope of "every function onsave_profile.rs" is covered.Verification
cargo build -p course_access # ✅Closes #206