mirror of
https://github.com/fafhrd91/actix-web
synced 2025-09-01 01:16:59 +02:00
refactor: use Payload::from internally
This commit is contained in:
@@ -65,9 +65,7 @@ impl TestResponse {
|
||||
|
||||
/// Set response's payload
|
||||
pub fn set_payload<B: Into<Bytes>>(mut self, data: B) -> Self {
|
||||
let (_, mut payload) = h1::Payload::create(true);
|
||||
payload.unread_data(data.into());
|
||||
self.payload = Some(payload.into());
|
||||
self.payload = Some(Payload::from(data.into()));
|
||||
self
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user