Skip to content

[PR #27] ProtocolId and FlashLoanSource enums need #[non_exhaustive] #68

@obchain

Description

@obchain

PR: #27 (commit 4a9a6d3)
File: crates/charon-core/src/types.rs, lines 14 and 42

Both ProtocolId (Venus-only today) and FlashLoanSource (3 variants today) are published types in workspace crate. Rustdoc on ProtocolId names future variants (AaveV3, CompoundV3, Morpho). Without #[non_exhaustive], any exhaustive match in downstream workspace crate fails to compile when new variant is added, forcing coordinated multi-crate changes.

Fix: Add #[non_exhaustive] above both enum definitions. Zero cost; downstream matches must include wildcard arm, future-proofing all match sites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    layer:rustRust crates (core / scanner / protocols / executor / cli)pr-reviewFindings from PR review processpriority:p2-polishNice-to-have / polish

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions