Conversation
Contributor
|
Docs preview was removed because this PR is closed. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the rand crate from version 0.9.2 to 0.10.0, a major version update with several breaking changes. The upgrade requires adapting to API changes including the rename of the Rng trait to RngExt and the removal of Clone support for StdRng.
Changes:
- Updated rand dependency from 0.9.2 to 0.10 in Cargo.toml
- Renamed
Rngtrait import toRngExtin device type files - Removed
Clonederive from device structs containingStdRng(BaseLoad, SolarPv, EvCharger) - Replaced
.clone()call with explicit instantiation in runner.rs to work around removed Clone support - Added explicit
_f32type suffixes to float literals in Box-Muller transform
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updated rand dependency version from 0.9.2 to 0.10 |
| Cargo.lock | Updated dependency tree including replacement of rand_chacha with chacha20 and addition of many transitive dependencies |
| src/devices/types.rs | Renamed Rng to RngExt import and added _f32 suffixes to float literals |
| src/devices/baseload.rs | Removed Clone derive from BaseLoad struct (contains StdRng) |
| src/devices/solar.rs | Removed Clone derive from SolarPv struct (contains StdRng) |
| src/devices/ev_charger.rs | Renamed Rng to RngExt import and removed Clone derive from EvCharger struct |
| src/runner.rs | Replaced load.clone() with explicit BaseLoad::new() instantiation using same parameters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Supersedes #61