Skip to content

Simplify generic constraints in push policy tests #199

@coderabbitai

Description

@coderabbitai

A suggestion was made to simplify the generic constraints in the dlq_error_scenarios function in tests/push_policies.rs around lines 156-157.

The current approach using BoxFuture adds complexity and explicit lifetime management. The suggestion is to replace the BoxFuture return type with async closures using higher-ranked trait bounds (for<'a>) and returning an impl Future instead.

This would simplify the code by leveraging async closures and removing the need for boxing and explicit lifetimes.

References:

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions