Skip to content

Remove unnecessary references in Android string formatting#720

Merged
moven0831 merged 3 commits into
mainfrom
claude/ci-failure-pr-719-zm48d4
Jul 12, 2026
Merged

Remove unnecessary references in Android string formatting#720
moven0831 merged 3 commits into
mainfrom
claude/ci-failure-pr-719-zm48d4

Conversation

@moven0831

@moven0831 moven0831 commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR removes unnecessary reference operators (&) in string formatting operations within the Android platform configuration module.

Key Changes

  • Removed & reference operator from uniffi_style_identifier in lib_name format string (line 72)
  • Removed & reference operator from uniffi_style_identifier in gen_android_kt_file_name format 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. The uniffi_style_identifier variable is already a String, and format! will handle it correctly without the explicit reference.

https://claude.ai/code/session_01QuAb1MjFT7j5X443dv2u9q

Summary by CodeRabbit

  • Bug Fixes
    • Improved Android build compatibility by correcting the generated library and Kotlin file naming behavior.
    • Fixed the CLI’s project initialization instructions to display and format the project name consistently in both the success message and the suggested cd command.
    • No changes were made to the public API or other build logic.

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
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@moven0831, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bf9143f0-d378-4bee-9d20-5799aab5999e

📥 Commits

Reviewing files that changed from the base of the PR and between f5b824a and 65ede3e.

📒 Files selected for processing (1)
  • cli/src/print.rs
📝 Walkthrough

Walkthrough

Formatting arguments now pass values directly in Android generated-name construction and CLI initialization output. Android module-name formatting remains unchanged.

Changes

Formatting argument updates

Layer / File(s) Summary
Format generated Android names
mopro-ffi/src/app_config/android.rs
lib_name and gen_android_kt_file_name now format with the identifier directly, while gen_android_module_name continues using a reference.
Format CLI initialization output
cli/src/print.rs
The project name is passed directly when formatting the success message and cd command.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main formatting-reference cleanup and is relevant to the changeset, though it mentions only the Android side.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/ci-failure-pr-719-zm48d4

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 11, 2026

Copy link
Copy Markdown

Deploying mopro with  Cloudflare Pages  Cloudflare Pages

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

View logs

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
@moven0831
moven0831 merged commit 3977310 into main Jul 12, 2026
51 of 55 checks passed
@moven0831
moven0831 deleted the claude/ci-failure-pr-719-zm48d4 branch July 12, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants