Skip to content

Remove Sync requirement on Body and Stream objects#1154

Open
macladson wants to merge 1 commit intoseanmonstar:masterfrom
macladson:use-unsync-box-body
Open

Remove Sync requirement on Body and Stream objects#1154
macladson wants to merge 1 commit intoseanmonstar:masterfrom
macladson:use-unsync-box-body

Conversation

@macladson
Copy link
Copy Markdown

Fixes #1153

Remove Sync from Body's trait bounds.
Also removes Sync from the various Stream objects as this also appears safe.

Comment thread src/bodyt.rs

#[derive(Debug)]
pub struct Body(BoxBody<Bytes, crate::Error>);
pub struct Body(UnsyncBoxBody<Bytes, crate::Error>);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think this would be a breaking change. Body no longer would satisfy Sync bounds. So, if somewhere else someone was putting warp::Body into a BoxBody, this change will cause compiler errors.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ah yes, good point. This would have to go into a major release

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.

Relax Sync requirements on Body type

2 participants