Remove unnecessary references in Android string formatting#720
Conversation
Clippy 1.97.0's useless_borrows_in_formatting lint (denied via -Dwarnings) flagged the redundant `&` on uniffi_style_identifier in two format! calls in the Android app_config, failing clippy_check in CI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QuAb1MjFT7j5X443dv2u9q
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. 📝 WalkthroughWalkthroughFormatting arguments now pass values directly in Android generated-name construction and CLI initialization output. Android module-name formatting remains unchanged. ChangesFormatting argument updates
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Clippy 1.97.0's useless_borrows_in_formatting lint (denied via -Dwarnings) flagged redundant `&project_name` in println!/format! calls in cli/src/print.rs. Clippy stops at the first crate that errors, so these only surfaced in CI after the mopro-ffi fix. Verified the full workspace is clean with the exact CI command using toolchain 1.97.0: RUSTFLAGS=-Dwarnings cargo clippy --all-targets --all-features. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QuAb1MjFT7j5X443dv2u9q
Deploying mopro with
|
| Latest commit: |
65ede3e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e66377da.mopro.pages.dev |
| Branch Preview URL: | https://claude-ci-failure-pr-719-zm4.mopro.pages.dev |
Removing the redundant `&` shortened the println! call enough that rustfmt collapses it onto a single line; apply that formatting so the lint (cargo fmt --check) job passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QuAb1MjFT7j5X443dv2u9q
Summary
This PR removes unnecessary reference operators (
&) in string formatting operations within the Android platform configuration module.Key Changes
&reference operator fromuniffi_style_identifierinlib_nameformat string (line 72)&reference operator fromuniffi_style_identifieringen_android_kt_file_nameformat string (line 75)Details
The
format!macro automatically dereferences arguments, so the explicit&operators were redundant. This change improves code clarity by removing unnecessary references while maintaining identical functionality. Theuniffi_style_identifiervariable is already aString, andformat!will handle it correctly without the explicit reference.https://claude.ai/code/session_01QuAb1MjFT7j5X443dv2u9q
Summary by CodeRabbit
cdcommand.