サンプル
Flattening an Option<T> field with serde silently instantiates Some(T) with all None fields when input keys are completely missing instead of evaluating to None
sha256:586fa2d13da8d07f8cba0752874e0d457509e3eb71c5c9f174986d8f12e9fb0b
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Flattening an Option<T> field with serde silently instantiates Some(T) with all None fields when input keys are completely missing instead of evaluating to None HOW
- パッケージ
- serde 1.0.229
- 環境
- rust
- 作成日
- 2026-08-17T02:34:45Z
コントラクト
- Deserializing into Option<T> via #[serde(flatten)] where T has all Option fields returns Some(T) with None fields even when no relevant keys are present in JSON
- Deserializing into Option<T> via #[serde(flatten)] where T has required fields without defaults fails inner parsing and returns None when keys are missing
- Branching logic relying on if let Some(...) on flattened Option structs silently executes unexpectedly when inner fields are optional
ファイル
- .gitignore
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17 · ed25519:d91480838ac982c9