Skip to content

🧹 [Code Health] Remove unused MontgomeryPoint struct#29

Open
tanm-sys wants to merge 4 commits into
mainfrom
jules-15938347445341184112-d8176a14
Open

🧹 [Code Health] Remove unused MontgomeryPoint struct#29
tanm-sys wants to merge 4 commits into
mainfrom
jules-15938347445341184112-d8176a14

Conversation

@tanm-sys

@tanm-sys tanm-sys commented May 21, 2026

Copy link
Copy Markdown
Owner

🎯 What: Removed the unused MontgomeryPoint struct in forge-ec-curves/src/curve25519.rs.
💡 Why: The struct was flagged with #[allow(dead_code)] and was not used anywhere in the codebase. Removing it reduces clutter and improves readability.
Verification: Ran cargo test and verified no new test failures were introduced.
Result: Cleaner code in curve25519.rs without dead code.


PR created automatically by Jules for task 15938347445341184112 started by @tanm-sys

Summary by CodeRabbit

  • Breaking Changes
    • Removed the MontgomeryPoint struct. Applications relying on this type for coordinate representation should migrate to the AffinePoint type.

Review Change Stack

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@tanm-sys has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes and 29 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b3335471-31de-4c11-befe-e0e72b74d8b4

📥 Commits

Reviewing files that changed from the base of the PR and between ee20b09 and 89b5672.

📒 Files selected for processing (5)
  • forge-ec-curves/src/curve25519.rs
  • forge-ec-curves/src/ed25519.rs
  • forge-ec-curves/src/p256.rs
  • forge-ec-curves/src/secp256k1.rs
  • target/.rustc_info.json
📝 Walkthrough

Walkthrough

The PR removes the public MontgomeryPoint struct from the Curve25519 module. This struct previously defined Montgomery form point coordinates using two field elements (u and v). The module now relies exclusively on the AffinePoint type for elliptic curve point representation.

Changes

MontgomeryPoint Type Removal

Layer / File(s) Summary
Remove MontgomeryPoint struct definition
forge-ec-curves/src/curve25519.rs
The public MontgomeryPoint struct definition (8 lines) is deleted, leaving AffinePoint as the sole exported point representation in the curve25519 module.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A point once stood in Montgomery's form,
With coordinates u and v, steady and warm,
But the rabbit said "go!"—off it went with a bound,
Now only Affine points remain to be found! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing an unused MontgomeryPoint struct for code health purposes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jules-15938347445341184112-d8176a14

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 and usage tips.

@kilo-code-bot

kilo-code-bot Bot commented May 21, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
forge-ec-curves/src/p256.rs 12 Removing eprintln import breaks tests
Files Reviewed (5 files)
  • forge-ec-curves/src/curve25519.rs — Cosmetic blank line removal
  • forge-ec-curves/src/ed25519.rs — Cosmetic line wrapping and blank line removal
  • forge-ec-curves/src/p256.rs — Cosmetic line wrapping and formatting
  • forge-ec-curves/src/secp256k1.rs — Cosmetic formatting changes
  • Cargo.lock — keccak 0.1.5 → 0.1.6

Reviewed by nemotron-3-super-120b-a12b-20230311:free · 1,286,055 tokens


use forge_ec_core::{Curve, FieldElement as CoreFieldElement, PointAffine, PointProjective};
use std::{eprintln, vec, vec::Vec};
use std::{vec, vec::Vec};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Removing eprintln import breaks tests

The import use std::{eprintln, vec, vec::Vec}; was changed to use std::{vec, vec::Vec};, removing the eprintln import. However, the test section of this file (lines ~2350+) uses eprintln! macros that depend on this import.

Either:

  1. Restore the eprintln import, or
  2. Update all eprintln! calls to use std::eprintln!

As written, this change will cause compilation failures in the tests.

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.

1 participant