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

Clippy errors in nightly 1.83.0-nightly: error: unneeded return statement #1055

Closed
josecelano opened this issue Oct 2, 2024 · 0 comments · Fixed by #1058
Closed

Clippy errors in nightly 1.83.0-nightly: error: unneeded return statement #1055

josecelano opened this issue Oct 2, 2024 · 0 comments · Fixed by #1058

Comments

@josecelano
Copy link
Member

josecelano commented Oct 2, 2024

Relates to: https://rust-lang.github.io/rust-clippy/master/index.html#/needless_return

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.83.0-nightly (06bb8364a 2024-10-01)

error: unneeded `return` statement
   --> tests/servers/udp/contract.rs:267:25
    |
267 |         env.stop().await;
    |                         ^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
267 |         env.stop().awaitenv.stop().await;
    |                         ~~~~~~~~~~~~~~~~~

error: unneeded `return` statement
   --> tests/servers/udp/environment.rs:113:44
    |
113 |         sleep(Duration::from_secs(1)).await;
    |                                            ^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
113 |         sleep(Duration::from_secs(1)).awaitsleep(Duration::from_secs(1)).await;
    |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: could not compile `torrust-tracker` (test "integration") due to 118 previous errors

It is complaining about #[tokio::test] using a semicolon in the last statement.

    #[tokio::test]
    async fn blab_bla() {
        let for = "bar"; // <- this semicolon
    }
@josecelano josecelano linked a pull request Oct 3, 2024 that will close this issue
3 tasks
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 a pull request may close this issue.

1 participant