mirror of
https://github.com/fafhrd91/actix-web
synced 2025-02-17 10:13:30 +01:00
use anybody in doc test
This commit is contained in:
parent
dd347e0bd0
commit
a2a42ec152
@ -28,15 +28,15 @@ pub use self::sized_stream::SizedStream;
|
|||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
/// ```
|
/// ```
|
||||||
/// use actix_http::body::{Body, to_bytes};
|
/// use actix_http::body::{AnyBody, to_bytes};
|
||||||
/// use bytes::Bytes;
|
/// use bytes::Bytes;
|
||||||
///
|
///
|
||||||
/// # async fn test_to_bytes() {
|
/// # async fn test_to_bytes() {
|
||||||
/// let body = Body::None;
|
/// let body = AnyBody::None;
|
||||||
/// let bytes = to_bytes(body).await.unwrap();
|
/// let bytes = to_bytes(body).await.unwrap();
|
||||||
/// assert!(bytes.is_empty());
|
/// assert!(bytes.is_empty());
|
||||||
///
|
///
|
||||||
/// let body = Body::Bytes(Bytes::from_static(b"123"));
|
/// let body = AnyBody::Bytes(Bytes::from_static(b"123"));
|
||||||
/// let bytes = to_bytes(body).await.unwrap();
|
/// let bytes = to_bytes(body).await.unwrap();
|
||||||
/// assert_eq!(bytes, b"123"[..]);
|
/// assert_eq!(bytes, b"123"[..]);
|
||||||
/// # }
|
/// # }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user