rust-lang / rustwide

Execute your code on the Rust ecosystem.
Apache License 2.0
182 stars 41 forks source link

Fix clippy warnings #54

Closed jyn514 closed 3 years ago

jyn514 commented 3 years ago

Fixes CI for https://github.com/rust-lang/rustwide/pull/53.

jyn514 commented 3 years ago

error: this function's return value is unnecessarily wrapped by Option

This is a bug in clippy, changing the return type would be a breaking change. It's fixed on nightly but not stable.

jyn514 commented 3 years ago

Oh wait, that's for a pub(crate) function. I'll fix it.

jyn514 commented 3 years ago

Oh wait, that's for a pub(crate) function. I'll fix it.

Nope, it's intentionally meant to be the same return type as windows::current_user.

jyn514 commented 3 years ago

Failure looks unrelated to my change :/

[INFO  rustwide::cmd] running `Command { std: "docker" "start" "-a" "aa0794c5521d231481ac2c06a84ed33417ee7733cd94c06317744a107202ac1b", kill_on_drop: false }`
[INFO  rustwide::cmd] [stderr]    Compiling out-of-memory v0.1.0 (/opt/rustwide/workdir)
[INFO  rustwide::cmd] [stderr] error: linker `cc` not found
[INFO  rustwide::cmd] [stderr]   |
[INFO  rustwide::cmd] [stderr]   = note: No such file or directory (os error 2)
[INFO  rustwide::cmd] [stderr] 
[INFO  rustwide::cmd] [stderr] error: aborting due to previous error
[INFO  rustwide::cmd] [stderr] 
[INFO  rustwide::cmd] [stderr] error: could not compile `out-of-memory`
pietroalbini commented 3 years ago

Removing https://github.com/rust-lang/rustwide/blob/76a2475ee73152d390479fbfb09dc46253372293/tests/utils/mod.rs#L25-L28 should do the trick.

jyn514 commented 3 years ago

I can't replicate the clippy failures locally. I think CI might be using an old version?

pietroalbini commented 3 years ago

@jyn514 hmm, seems like there are some new warnings introduced by 1.51 :sweat_smile:

I think we can #![allow] the capitalization one, I'm not going to break backward compatibility due to it.