Skip to content

test(header): fix trait bounds in test_bounds to Send + Sync (#783) - #867

Merged
seanmonstar merged 1 commit into
hyperium:masterfrom
CyberneticX-Tech:fix/test-bounds-send-sync
Sep 2, 2026
Merged

test(header): fix trait bounds in test_bounds to Send + Sync (#783)#867
seanmonstar merged 1 commit into
hyperium:masterfrom
CyberneticX-Tech:fix/test-bounds-send-sync

Conversation

@CyberneticX-Tech

Copy link
Copy Markdown
Contributor

Summary

Fixes #783.

In src/header/map.rs, test_bounds() defines a nested helper:

fn check_bounds<T: Send + Send>() {}

The bound repeated Send instead of testing both Send and Sync.

This PR changes the trait bounds to T: Send + Sync so that HeaderMap and its associated iterators and entries (Iter, IterMut, Keys, Values, ValuesMut, Drain, GetAll, Entry, VacantEntry, OccupiedEntry, ValueIter, ValueIterMut, ValueDrain) are verified to implement both Send and Sync.

Verification

  • cargo test header::map::test_bounds: PASS
  • cargo test: 228 tests passed cleanly
  • cargo fmt --all --check: clean

Change check_bounds<T: Send + Send> to check_bounds<T: Send + Sync> in
src/header/map.rs to properly test that HeaderMap and associated
iterator/entry types satisfy both Send and Sync.

Fixes hyperium#783

@seanmonstar seanmonstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@seanmonstar
seanmonstar merged commit b6161d8 into hyperium:master Sep 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken test_bonds test function in maps.rs.

2 participants