Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix doc test in ref package #1501

Merged
merged 1 commit into from
Jan 17, 2025
Merged

fix doc test in ref package #1501

merged 1 commit into from
Jan 17, 2025

Conversation

Yu-zh
Copy link
Collaborator

@Yu-zh Yu-zh commented Jan 17, 2025

No description provided.

Copy link

‼️ This code review is generated by a bot. Please verify the content before trusting it.

Looking at the git diff, here are the potential issues I've noticed:

  1. Inconsistent Closure Syntax: The example code changes from fn!() to fn (). This could be problematic if fn!() was specifically required for macro expansion or special handling. The removal of the ! might affect the behavior of the closure.

  2. Documentation Accuracy: The example in the documentation asserts that x.val equals 1, but it's not immediately clear if this is correct given the operations performed. The code sets the value to 3 within the protect function, so the assertion's correctness depends on whether protect is supposed to roll back changes, which should be explicitly documented.

  3. Missing Return Type Documentation: The example code shows protect being used, but there's no clear documentation about what type R (the return type) should be or what the function returns in different scenarios. This could lead to confusion for users of the API.

These are potential issues that might need attention based on the context shown in the diff.

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 4811

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.126%

Totals Coverage Status
Change from base Build 4797: 0.0%
Covered Lines: 4872
Relevant Lines: 5861

💛 - Coveralls

@Yu-zh Yu-zh merged commit b73094c into moonbitlang:main Jan 17, 2025
14 checks passed
@Yu-zh Yu-zh deleted the fix-ref branch January 17, 2025 09:03
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.

2 participants