Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find function spawn #5

Open
DreamTexX opened this issue Mar 2, 2023 · 0 comments
Open

Cannot find function spawn #5

DreamTexX opened this issue Mar 2, 2023 · 0 comments

Comments

@DreamTexX
Copy link

error[E0425]: cannot find function `spawn` in crate `tokio`
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/stream-body-0.1.1/src/body.rs:104:16
    |
104 |         tokio::spawn(async move {
    |                ^^^^^ not found in `tokio`
    |
help: consider importing this function
    |
1   | use std::thread::spawn;
    |
help: if you import `spawn`, refer to it directly
    |
104 -         tokio::spawn(async move {
104 +         spawn(async move {
    |

error[E0425]: cannot find function `copy` in module `io`
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/stream-body-0.1.1/src/body.rs:105:35
    |
105 |             if let Err(err) = io::copy(&mut r, &mut w).await {
    |                                   ^^^^ not found in `io`
    |
help: consider importing one of these items
    |
1   | use core::mem::copy;
    |
1   | use core::ptr::copy;
    |
1   | use std::fs::copy;
    |
1   | use std::io::copy;
    |
      and 2 other candidates
help: if you import `copy`, refer to it directly
    |
105 -             if let Err(err) = io::copy(&mut r, &mut w).await {
105 +             if let Err(err) = copy(&mut r, &mut w).await {
    |

For more information about this error, try `rustc --explain E0425`.
error: could not compile `stream-body` due to 2 previous errors

How can i fix this?

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

No branches or pull requests

1 participant