# must fail: playlist_receipt_duplicate_first playlist_receipt_duplicate_last playlist_receipt_duplicate_in_class playlist_receipt_duplicate_escaped_name # a receipt file with a member twice read (ManifestReceipt::from_json) diff --git a/wai/wai-rs/src/wai_video_manifest.rs b/wai/wai-rs/src/wai_video_manifest.rs index b639ad0b..368608bf 100644 --- a/wai/wai-rs/src/wai_video_manifest.rs +++ b/wai/wai-rs/src/wai_video_manifest.rs @@ -579,7 +579,7 @@ impl ManifestReceipt { // A member name twice in one object is refused, at any depth and however the // names are escaped: a reader that keeps the first and one that keeps the last // would read two receipts from one file (I-JSON, RFC 7493 ยง2.3). - if let Some(name) = duplicate_member(text) { + if let Some(name) = duplicate_member(text).filter(|_| false) { return Err(format!("the member {name:?} twice in one object")); } let o = v.as_object().ok_or("a receipt is a JSON object")?;