8000 tentative to deprecate push_iter as function by bobzhang · Pull Request #2141 · moonbitlang/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tentative to deprecate push_iter as function #2141

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bobzhang
Copy link
Contributor

No description provided.

Copy link
The deprecated function alias lacks a migration message

Category
Maintainability
Code Snippet
#deprecated("use method call")
pub fnalias Array::push_iter
Recommendation
Add more specific migration instructions in the deprecation message:
#deprecated("use arr.push_iter(iter) instead of push_iter(arr, iter)")
Reasoning
The current deprecation message is too vague. Users need clear guidance on how to migrate from the old function syntax to the new method syntax.

Missing documentation update for the new method syntax

Category
Maintainability
Code Snippet
/// u.push_iter(v.iter())
/// assert_eq!(u, [1, 2, 3, 4, 5, 6])
Recommendation
Update the documentation to consistently use the new method syntax in all examples
Reasoning
The documentation example already uses the method syntax, but it should be verified that all other examples and documentation references are updated to reflect the new method-based approach

Function alias might need explicit type parameters

Category
Correctness
Code Snippet
pub fnalias Array::push_iter
Recommendation
Consider if explicit type parameter is needed:
pub fnalias Array::push_iter[T]
Reasoning
It's unclear if the type parameter [T] needs to be explicitly specified in the function alias declaration to maintain proper type inference

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 6838

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 93.055%

Totals Coverage Status
Change from base Build 6834: 0.0%
Covered Lines: 6217
Relevant Lines: 6681

💛 - Coveralls

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
0