open-standards/wai/http-conformance/falsify/union-no-layer.patch
Transaction Science 909312ce15 wai: falsification patches for the fix round, and the four the rewrite moved, regenerated
New: threshold-all, refusal-ends, reuse-stale, plus-sign, dispatch-layer,
union-no-layer, wai-prefix-case, dup-caps, record-alt, base-unanswered, each
naming the corpus cases it must fail. accept-gzip, trust-content-range,
skip-on-absent and intersection are the same defects written against the
current code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 09:35:08 -04:00

15 lines
758 B
Diff

# must fail: union_O10_layers
# a layer joins no alt (codecs::described)
diff --git a/wai/wai-rs/src/http_binding/codecs.rs b/wai/wai-rs/src/http_binding/codecs.rs
index 530ae822..161ed997 100644
--- a/wai/wai-rs/src/http_binding/codecs.rs
+++ b/wai/wai-rs/src/http_binding/codecs.rs
@@ -326,7 +326,7 @@ fn described(objects: &[SeqObject]) -> Result<Vec<Element>, CodecsError> {
let el = els[k].as_mut().expect("a base is not a layer");
let alt = el.alts.iter_mut().find(|a| a.cap == base_cap)
.ok_or_else(|| CodecsError::LayerUnbound(format!("wai.{cap}: its base's capability is not dispatched")))?;
- push_unique(&mut alt.plus, cap);
+ let _ = (alt, cap);
}
Ok(els.into_iter().flatten().collect())
}