Sha256: f5d3ddc9f6e8152ceb08b5dda2ca3168b174f1f67ff28a4c5983bcbad69d8af6

Contents?: true

Size: 359 Bytes

Versions: 39

Compression:

Stored size: 359 Bytes

Contents

#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]

use tokio::io::AsyncReadExt;
use tokio_test::assert_ok;

#[tokio::test]
async fn chain() {
    let mut buf = Vec::new();
    let rd1: &[u8] = b"hello ";
    let rd2: &[u8] = b"world";

    let mut rd = rd1.chain(rd2);
    assert_ok!(rd.read_to_end(&mut buf).await);
    assert_eq!(buf, b"hello world");
}

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
wasmtime-30.0.2 ./ext/cargo-vendor/tokio-1.43.0/tests/io_chain.rs
wasmtime-29.0.0 ./ext/cargo-vendor/tokio-1.43.0/tests/io_chain.rs
wasmtime-28.0.0 ./ext/cargo-vendor/tokio-1.43.0/tests/io_chain.rs
wasmtime-27.0.0 ./ext/cargo-vendor/tokio-1.41.1/tests/io_chain.rs
wasmtime-26.0.0 ./ext/cargo-vendor/tokio-1.41.0/tests/io_chain.rs
wasmtime-25.0.2 ./ext/cargo-vendor/tokio-1.40.0/tests/io_chain.rs
wasmtime-25.0.1 ./ext/cargo-vendor/tokio-1.39.3/tests/io_chain.rs
wasmtime-25.0.0 ./ext/cargo-vendor/tokio-1.39.3/tests/io_chain.rs
wasmtime-24.0.0 ./ext/cargo-vendor/tokio-1.39.3/tests/io_chain.rs
wasmtime-23.0.2 ./ext/cargo-vendor/tokio-1.36.0/tests/io_chain.rs
wasmtime-22.0.0 ./ext/cargo-vendor/tokio-1.36.0/tests/io_chain.rs
wasmtime-21.0.1 ./ext/cargo-vendor/tokio-1.36.0/tests/io_chain.rs
wasmtime-20.0.2 ./ext/cargo-vendor/tokio-1.36.0/tests/io_chain.rs
wasmtime-20.0.0 ./ext/cargo-vendor/tokio-1.36.0/tests/io_chain.rs
wasmtime-18.0.3 ./ext/cargo-vendor/tokio-1.36.0/tests/io_chain.rs
wasmtime-17.0.1 ./ext/cargo-vendor/tokio-1.35.1/tests/io_chain.rs
wasmtime-17.0.0 ./ext/cargo-vendor/tokio-1.35.1/tests/io_chain.rs
wasmtime-16.0.0 ./ext/cargo-vendor/tokio-1.35.1/tests/io_chain.rs
wasmtime-15.0.1 ./ext/cargo-vendor/tokio-1.35.1/tests/io_chain.rs
wasmtime-15.0.0 ./ext/cargo-vendor/tokio-1.35.1/tests/io_chain.rs