cs431
cs431 copied to clipboard
[Question] Clippy "errors" in submission
From my understanding - we are meant to fix clippy "errors" (warnings) for our code to to accepted into gg, however some of the errors are pretty restrictive.
For instance this is a warning on my local, but on the server it gives and error
I don't think it's warning on your local, since the #[deny(warnings)]
is in src/lib.rs
, which means it's converted to error.
Just do what the lints says you to do, use a type
definition.
Instead of disabling clippy
, you can just follow the instructions by the clippy
as @m-spitfire said. In most cases, you can easily modify the code with little effort so that it passes clippy
. By doing so, you can write a better Rust code with reduced possibility of mistakes.
For this reason, we enforce everyone to submit a solution that passes the clippy
.
Related: https://github.com/kaist-cp/cs431/issues/606#issuecomment-1235141296 https://github.com/kaist-cp/cs431/issues/637#issuecomment-1254468805
Please don't post images.
We also ask to fix clippy explicity, as seen on the last line on your image:
'Please fix the issues from `cargo +nightly clippy -- -D warnings` first.'
BTW, the model solution uses a simpler type that does not face such errors.