Tidy up#17
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR tidies up the visualize module by removing unused or redundant code and improving encapsulation in the Model structure. Key changes include removing the unused Technique enum, making some Model fields private and adding a setter for mouse_position, and updating related call sites throughout the codebase.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| visualize/src/model.rs | Removed Technique enum; encapsulated Model fields; updated draw_app logic. |
| visualize/src/main.rs | Replaced direct field assignments with setter calls; updated draw_app usage. |
| visualize/src/lib.rs | Removed outdated export of Technique to match changes in model.rs. |
Comments suppressed due to low confidence (3)
visualize/src/model.rs:20
- Removal of the public Technique enum may break external consumers if they relied on it. Confirm that this export is no longer needed and update any dependent documentation or tests accordingly.
-pub enum Technique {
visualize/src/model.rs:23
- Changing 'points', 'mouse_position', and 'region' from public to private improves encapsulation; ensure that all required external interactions with these fields now use provided accessor or setter methods.
pub struct Model {
visualize/src/model.rs:70
- [nitpick] The update to draw_app now exclusively uses internal points, removing flexibility of drawing a custom set of points; verify that this change aligns with the overall design intentions.
pub fn draw_app(&self, draw: &Draw) {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.