fix(tests): resolve String addition compilation errors under Rust 1.96#737
Conversation
Fix compilation failures under Rust 1.96.0+ caused by attempting to add `&String` to `String` (e.g. `cannot add &String to String`). Resolved by converting string repetitions to borrowed string slices using `.as_str()` before addition. This ensures the entire integration test registry compiles successfully. Assisted-by: Antigravity with Gemini
|
Thanks for the PR. I tried to reproduce this and could not: Could you share your exact |
|
Doh, sorry about this. I had just updated The real issue is that in a subsequent change I'm looking at adding use of a Rust crate that transitively pulls in the I can fold the fix (this commit or an alternative) into the PR that adds the thing that uses them so it makes more sense. A question: any preference about how we do this? There is the approach in this PR, but we could also more aggressively use |
|
Thanks for the follow-up, that explains it. Folding it into the dependency PR sounds right, since there's nothing to merge standalone (upstream Rust compiles the current code fine). On style: I'd keep the minimal |
Fix compilation failures under Rust 1.96.0+ caused by attempting to add
&StringtoString(e.g.cannot add &String to String).Resolved by converting string repetitions to borrowed string slices using
.as_str()before addition. This ensures the entire integration test registry compiles successfully.Assisted-by: Antigravity with Gemini