chore: bump dependencies, clippy 1.89, cargo update, MSRV 1.86#2103
chore: bump dependencies, clippy 1.89, cargo update, MSRV 1.86#2103
Conversation
There was a problem hiding this comment.
Greptile Summary
This PR performs routine dependency maintenance by updating multiple Rust dependencies to their latest versions and addressing Clippy 1.89 linting recommendations. The changes fall into two main categories:
-
Dependency Updates: The workspace-level
Cargo.tomlreceives significant updates including a major version bump forcargo_metadata(0.19.1 → 0.22), which introduces breaking API changes aroundTargetKindandCrateTypeenums. Other notable updates includegix(0.71 → 0.73),tokio-tungstenite(0.26.1 → 0.27),toml(0.8.2 → 0.9),toml_edit(0.22.22 → 0.23), andzip(3 → 4). Some dependencies also move to simplified version specifications (e.g.,syn"2.0" → "2"). -
Code Refactoring for Clippy Compliance: Three source files receive minor but important refactoring changes to satisfy updated Clippy lints. In
cargo-shuttle/src/provisioner_server.rs, two instances of&[response.clone()]are replaced withstd::slice::from_ref(&response), eliminating unnecessary cloning when creating single-element slices. Incargo-shuttle/src/lib.rsandcargo-shuttle/src/args.rs, string handling is improved by replacing.clone()calls with.to_string()when converting to owned String types.
These changes integrate well with the existing codebase by maintaining all existing functionality while adopting more idiomatic Rust patterns and staying current with dependency ecosystem improvements. The refactoring changes specifically target performance optimization by avoiding unnecessary memory allocations while preserving identical behavior.
Important Files Changed
File Changes Summary
| Filename | Score | Overview |
|---|---|---|
Cargo.toml |
2/5 | Major dependency version bumps including breaking changes in cargo_metadata 0.22 |
cargo-shuttle/src/provisioner_server.rs |
5/5 | Replaced inefficient slice creation with std::slice::from_ref to eliminate cloning |
cargo-shuttle/src/lib.rs |
5/5 | Changed string cloning to direct string conversion for better performance |
cargo-shuttle/src/args.rs |
5/5 | Improved string handling by using to_string() instead of clone() |
Confidence score: 3/5
- This PR contains mostly safe refactoring changes but includes significant dependency updates that could introduce breaking changes
- Score reflects the cargo_metadata major version bump which introduces API changes that may require additional code updates beyond what's included in this PR
- Pay close attention to
Cargo.tomland ensure the cargo_metadata breaking changes don't affect other parts of the codebase
Sequence Diagram
sequenceDiagram
participant User
participant CLI as cargo-shuttle CLI
participant Shuttle as Shuttle struct
participant Client as ShuttleApiClient
participant LocalProv as LocalProvisioner
participant Docker
User->>CLI: "shuttle deploy"
CLI->>CLI: "parse_args()"
CLI->>Shuttle: "new()"
Shuttle->>Shuttle: "RequestContext::load_global()"
CLI->>Shuttle: "run(args)"
Shuttle->>Client: "ShuttleApiClient::new()"
Shuttle->>Shuttle: "load_project()"
Client->>Client: "get_projects_list()"
Shuttle->>Shuttle: "deploy()"
Shuttle->>Shuttle: "get_secrets()"
Shuttle->>Shuttle: "make_archive()"
Client->>Client: "upload_archive()"
Client->>Client: "deploy()"
Shuttle->>Shuttle: "track_deployment_status()"
loop Deployment tracking
Client->>Client: "get_deployment()"
Shuttle->>Shuttle: "wait_with_spinner()"
end
alt Deployment failed
Client->>Client: "get_deployment_logs()"
Shuttle->>User: "Display logs"
else Deployment succeeded
Shuttle->>User: "Display success"
end
4 files reviewed, no comments
No description provided.