-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add comment about 6 params #6125
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds documentation comments in vm/src/function/argument.rs after into_func_args_from_tuple! macro invocations, clarifying current support for six unnamed positional arguments, suggesting using #[derive(FromArgs)] for complex parsing, and noting a Clippy-related limitation with a reference link. No functional or API changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
vm/src/function/argument.rs (3)
58-61
: Tighten wording and fix grammar; clarify the lint reference.Small nits to improve clarity and correctness.
-// We currently allows only 6 unnamed positional arguments. -// Please use `#[derive(FromArgs)]` and a struct for more complex argument parsing. -// The number of limitation came from: -// -// https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments +// We currently allow only 6 unnamed positional arguments. +// For more complex argument parsing, prefer `#[derive(FromArgs)]` on a struct. +// This limit follows Clippy's `too_many_arguments` lint: +// https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
585-596
: Comment says “7-tuples” but code implements up to 8 (A..H).Either update the comment to “8-tuples” or drop the
H
expansion. Prefer updating the comment for accuracy.-// Implement `FromArgs` for up to 7-tuples, allowing built-in functions to bind -// up to 7 top-level parameters (note that `PosArgs`, `KwArgs`, nested tuples, etc. +// Implement `FromArgs` for up to 8-tuples, allowing built-in functions to bind +// up to 8 top-level parameters (note that `PosArgs`, `KwArgs`, nested tuples, etc.
63-66
: Minor typo in doc comment.“then creating” → “when creating”.
-/// The `FuncArgs` struct is one of the most used structs then creating +/// The `FuncArgs` struct is one of the most used structs when creating
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
vm/src/function/argument.rs
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.rs
: Follow the default rustfmt code style (cargo fmt
to format)
Always run clippy to lint code (cargo clippy
) before completing tasks. Fix any warnings or lints that are introduced by your changes
Follow Rust best practices for error handling and memory management
Use the macro system (pyclass
,pymodule
,pyfunction
, etc.) when implementing Python functionality in Rust
Files:
vm/src/function/argument.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: Run snippets and cpython tests on wasm-wasi
- GitHub Check: Run tests under miri
- GitHub Check: Run snippets and cpython tests (windows-latest)
- GitHub Check: Check the WASM package and demo
- GitHub Check: Run rust tests (windows-latest)
- GitHub Check: Run rust tests (macos-latest)
- GitHub Check: Run snippets and cpython tests (macos-latest)
- GitHub Check: Run snippets and cpython tests (ubuntu-latest)
- GitHub Check: Run rust tests (ubuntu-latest)
- GitHub Check: Check Rust code with rustfmt and clippy
- GitHub Check: Ensure compilation on various targets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable 👍
close #6098
close #6101
Technically #6101 can be a solution of #6098, but we have to set a limitation.
Practically 6 is a good point due to harmony of other Rust ecosystem like clippy
Summary by CodeRabbit