Skip to content

chore: use std phantomdata instead of private serde#403

Merged
elmattic merged 1 commit intomainfrom
use-standard-phantom-data
Sep 23, 2025
Merged

chore: use std phantomdata instead of private serde#403
elmattic merged 1 commit intomainfrom
use-standard-phantom-data

Conversation

@LesnyRumcajs
Copy link
Member

@LesnyRumcajs LesnyRumcajs commented Sep 23, 2025

Summary of changes
Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Summary by CodeRabbit

  • New Features

    • No user-facing features added.
  • Refactor

    • Standardized internal imports in map utilities across multiple versions to use stable, public interfaces, improving maintainability and forward compatibility.
  • Chores

    • Performed minor internal cleanup to reduce reliance on private dependencies. No changes to behavior, performance, or public APIs. Users should not experience any differences.

@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner September 23, 2025 09:39
@LesnyRumcajs LesnyRumcajs requested review from elmattic and sudo-shashank and removed request for a team September 23, 2025 09:39
@coderabbitai
Copy link

coderabbitai bot commented Sep 23, 2025

Walkthrough

Replaced imports of PhantomData from serde::__private to std::marker across MapMap implementations in v9–v17 directories. No changes to public signatures, logic, or control flow.

Changes

Cohort / File(s) Summary
PhantomData import path update
fil_actors_shared/src/v*/util/mapmap.rs
Switched serde::__private::PhantomData to std::marker::PhantomData in MapMap; no public API or behavioral changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • akaladarshi
  • hanabi1224

Poem

Hop hop! I tweak with gentle paws,
From secret serde lanes to std’s clean laws.
No maps were moved, no keys astray—
Just Phantom paths now point the way.
Carrot commit, compile delight,
Tiny change, all systems right. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title is a short, single-sentence summary that accurately captures the primary change in the diff — replacing usage of PhantomData from serde's private path with the standard library. It is concise, relevant to the changes, and readable for teammates scanning PR history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch use-standard-phantom-data

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c8dc60 and 5568aec.

📒 Files selected for processing (9)
  • fil_actors_shared/src/v10/util/mapmap.rs (1 hunks)
  • fil_actors_shared/src/v11/util/mapmap.rs (1 hunks)
  • fil_actors_shared/src/v12/util/mapmap.rs (1 hunks)
  • fil_actors_shared/src/v13/util/mapmap.rs (1 hunks)
  • fil_actors_shared/src/v14/util/mapmap.rs (1 hunks)
  • fil_actors_shared/src/v15/util/mapmap.rs (1 hunks)
  • fil_actors_shared/src/v16/util/mapmap.rs (1 hunks)
  • fil_actors_shared/src/v17/util/mapmap.rs (1 hunks)
  • fil_actors_shared/src/v9/util/mapmap.rs (1 hunks)
🔇 Additional comments (10)
fil_actors_shared/src/v15/util/mapmap.rs (1)

9-9: Approve — use std::marker::PhantomData; no remaining serde::__private usage

Verified: ripgrep found no occurrences of serde::__private or serde::__private::PhantomData.

fil_actors_shared/src/v16/util/mapmap.rs (1)

9-9: Switch to std::marker::PhantomData is correct and removes reliance on serde internals.

No behavior or API changes. Consistent with idiomatic Rust.

fil_actors_shared/src/v10/util/mapmap.rs (1)

12-12: Good cleanup: use std::marker::PhantomData instead of serde::__private.

Reduces brittle dependency on private serde internals; no functional changes.

fil_actors_shared/src/v17/util/mapmap.rs (1)

9-9: Correct import source for PhantomData.

Aligns with standard library; no impact on type semantics here.

fil_actors_shared/src/v9/util/mapmap.rs (1)

12-12: LGTM — switched to std::marker::PhantomData; no serde::__private::PhantomData usages remain.
rg scan shows only std::marker::PhantomData imports across the repo.

fil_actors_shared/src/v12/util/mapmap.rs (1)

12-12: Approve: switch to std::marker::PhantomData

Confirmed no remaining uses of serde::__private::PhantomData in the repo (ripgrep returned "OK: no private serde PhantomData usages found").

fil_actors_shared/src/v14/util/mapmap.rs (2)

9-9: LGTM! Correct replacement of private serde import with standard library PhantomData.

This change replaces the import from the private serde module (serde::__private::PhantomData) with the standard library equivalent (std::marker::PhantomData). This is the correct approach as using private APIs from external crates creates fragile dependencies that can break with version updates.


20-20: Verified — PhantomData usage is consistent across v9–v17; no changes needed.
rg finds no serde::__private::PhantomData; each fil_actors_shared/src/v9–v17/util/mapmap.rs imports std::marker::PhantomData and uses key_types: PhantomData<(K1, K2)>.

fil_actors_shared/src/v13/util/mapmap.rs (1)

9-9: Good swap to std::marker::PhantomData — no serde::__private usages remain.
Avoids relying on serde internals; no behavioral or API changes.

fil_actors_shared/src/v11/util/mapmap.rs (1)

9-9: Approve: switch to std::marker::PhantomData — verified

No occurrences of serde::__private::PhantomData found; std::marker::PhantomData is used consistently across fil_actors_shared (v9–v17). Change is correct and unblocks serde upgrades.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

@elmattic elmattic added this pull request to the merge queue Sep 23, 2025
Merged via the queue into main with commit d62973a Sep 23, 2025
5 checks passed
@elmattic elmattic deleted the use-standard-phantom-data branch September 23, 2025 12:46
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.

3 participants