chore: Use the idiomatic way of create a default for Config#150
chore: Use the idiomatic way of create a default for Config#150doubleailes merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the codebase to use the idiomatic Rust Default trait for creating a Config instance by replacing calls to Config::default_config() with Config::default().
- Update of inline examples and documentation in multiple files (rpc_task.rs, rpc_service.rs, rpc_client.rs, lib.rs, quick-start.md, README.md)
- Implementation change in config.rs: converting the custom default_config() method into a Default trait implementation
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| girolle/src/rpc_task.rs | Updated documentation example to use Config::default() |
| girolle/src/rpc_service.rs | Updated documentation examples to use Config::default() |
| girolle/src/rpc_client.rs | Updated documentation examples to use Config::default() |
| girolle/src/lib.rs | Updated documentation example to use Config::default() |
| girolle/src/config.rs | Switched from default_config() to a Default trait implementation |
| docs/content/docs/getting-started/quick-start.md | Updated code sample to use Config::default() |
| README.md | Updated code sample to use Config::default() |
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Code Suggestions ✨No code suggestions found for the PR. |
PR Type
Enhancement, Documentation
Description
Refactored
Configto implement Rust'sDefaulttrait idiomaticallydefault_config()toDefault::default()Config::default_config()toConfig::default()Updated documentation and code examples to use
Config::default()Adjusted tests to use the new default config instantiation
Changes walkthrough 📝
1 files
Refactor Config to implement Default trait idiomatically6 files
Update code examples to use Config::default()Update RpcClient docs and code to use Config::default()Update RpcService docs and code to use Config::default()Update RpcTask docs to use Config::default()Update README config example to use Config::default()Update quick start guide to use Config::default()