Skip to content

Conversation

castelao
Copy link
Member

@castelao castelao commented Oct 12, 2025

New Solution to hold routing solution. More methods will be implemented, but for now the goal is to hide its composition to make it easier the larger refactoring under way.

@castelao castelao self-assigned this Oct 12, 2025
@castelao castelao requested a review from ppinchuk as a code owner October 12, 2025 00:44
@Copilot Copilot AI review requested due to automatic review settings October 12, 2025 00:44
@castelao castelao added enhancement Update to logic or general code improvements topic-rust-general Issues/pull requests related to rust p-medium Priority: medium labels Oct 12, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a structured Solution type to encapsulate routing results, replacing the previous tuple-based approach for better type safety and code clarity.

  • Adds a new Solution<I, C> struct to represent routing solutions with route and cost data
  • Refactors routing methods to return Solution instances instead of (Vec<ArrayIndex>, f32) tuples
  • Updates all test cases to use the new Solution API methods

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
crates/revrt/src/solution.rs Defines the new Solution struct with generic route and cost types
crates/revrt/src/routing/mod.rs Updates routing methods to return Solution instances and removes commented code
crates/revrt/src/lib.rs Integrates Solution usage and updates all test cases to use new API

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@castelao castelao merged commit d343855 into main Oct 12, 2025
22 checks passed
@castelao castelao deleted the solution branch October 12, 2025 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Update to logic or general code improvements p-medium Priority: medium topic-rust-general Issues/pull requests related to rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant