test(header): assert HeaderMap types are Sync in test_bounds

The check_bounds helper used a duplicated Send bound (Send + Send), so
the intended Sync assertion was never enforced and the test silently
checked Send only. Use Send + Sync so the test fails to compile if any
of the HeaderMap iterator or entry types ever stops being Sync.

Refs https://github.com/hyperium/http/issues/783
This commit is contained in:
dualfroz committed 2026-09-02 10:08:05 +02:00
1 parent 43abbf3d13
commit 9471165132
1 file changed
+1 -1
+1 -1
View File
@@ -4026,7 +4026,7 @@ mod as_header_name {
#[test]
fn test_bounds() {
fn check_bounds<T: Send + Send>() {}
fn check_bounds<T: Send + Sync>() {}
check_bounds::<HeaderMap<()>>();
check_bounds::<Iter<'static, ()>>();