Skip to content

Conversation

@Majormaxx
Copy link

Summary

This PR adds comprehensive docstrings to all functions in contracts/course/course_access/src/functions/list_user_courses.rs, following the project's documentation template as specified in issue #203.

Changes

list_user_courses function

Added documentation including:

  • Brief description: Explains that the function retrieves the list of courses associated with a specific user
  • Arguments:
    • env - The Soroban environment context
    • user - The blockchain address of the user
  • Returns: Description of the UserCourses struct returned

test_list_user_courses test function

Added documentation describing the test's purpose and what it verifies.

Documentation Format

All docstrings follow the required template:

/// Brief description: explains what the function does.
///
/// # Arguments
///
/// * `param1` - Explanation of the first parameter.
/// * `param2` - Explanation of the second parameter.
///
/// # Returns
///
/// * `Result<T, E>` - What the function returns.

Checklist

  • Docstrings added to all functions
  • Follows project documentation template
  • Includes parameter descriptions
  • Includes return value description

Closes #203

Added comprehensive docstrings following the project template to:
- `list_user_courses` function with description, arguments, and return value
- `test_list_user_courses` test function with description

Closes SkillCert#203
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Add docstring with description, params, and return

1 participant