Skip to content

Replace #[allow] with parameter struct in bind_std_listener function #273

@coderabbitai

Description

@coderabbitai

Problem

The bind_std_listener function in src/server/config.rs currently uses #[allow(clippy::too_many_arguments)] to suppress the lint warning, which violates our coding guidelines that forbid #[allow] directives.

Solution

Replace the #[allow] directive by grouping related parameters into a struct:

  • Create a BindConfig<F, T> struct containing: factory, workers, on_preamble_success, on_preamble_failure, and ready_tx
  • Update the function signature to accept BindConfig<F, T> and std_listener as parameters
  • Adjust the function body to use struct fields instead of individual parameters
  • Update the bind_with_std_listener method to construct the config struct

Context

This issue was identified during code review of PR #262 in this comment.

Issue: #273

Files affected

  • src/server/config.rs (lines 196-222)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions