PR: #28 (feat/03-lending-protocol-trait)
File: crates/charon-core/src/types.rs, lines 69-79
LiquidationParams has one variant (Venus) today. Rustdoc on the enum explicitly names future protocols (Aave, Compound). Without #[non_exhaustive], any exhaustive match in downstream workspace crate fails to compile on variant add, forcing coordinated multi-crate change.
Same finding applies to the single Venus struct variant — mark #[non_exhaustive] at variant level so new fields (e.g., comptroller_address) do not break public matches.
Fix:
#[non_exhaustive]
pub enum LiquidationParams {
#[non_exhaustive]
Venus {
borrower: Address,
collateral_vtoken: Address,
debt_vtoken: Address,
repay_amount: U256,
},
}
PR: #28 (feat/03-lending-protocol-trait)
File: crates/charon-core/src/types.rs, lines 69-79
LiquidationParamshas one variant (Venus) today. Rustdoc on the enum explicitly names future protocols (Aave, Compound). Without#[non_exhaustive], any exhaustive match in downstream workspace crate fails to compile on variant add, forcing coordinated multi-crate change.Same finding applies to the single
Venusstruct variant — mark#[non_exhaustive]at variant level so new fields (e.g.,comptroller_address) do not break public matches.Fix: