Introduce cloze-task #344
Annotations
24 warnings
|
this boolean expression can be simplified:
challenges/src/endpoints/coding_challenges/submissions.rs#L600
warning: this boolean expression can be simplified
--> challenges/src/endpoints/coding_challenges/submissions.rs:600:12
|
600 | if !self
| ____________^
601 | | .ids
602 | | .get(&key)
603 | | .is_some_and(|&x| self.id_position(x) == 0)
| |_______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#nonminimal_bool
= note: `#[warn(clippy::nonminimal_bool)]` on by default
help: try
|
600 ~ if self
601 + .ids
602 + .get(&key).is_none_or(|&x| self.id_position(x) != 0)
|
|
|
large size difference between variants:
challenges/src/endpoints/coding_challenges/submissions.rs#L468
warning: large size difference between variants
--> challenges/src/endpoints/coding_challenges/submissions.rs:468:1
|
468 | / enum JudgeSubmissionError {
469 | | #[error("failed to judge submission: {0}")]
470 | | Judge(#[from] judge::Error),
| | --------------------------- the largest variant contains at least 344 bytes
471 | | #[error("database error: {0}")]
... |
476 | | TaskRewards(#[from] SendTaskRewardsError),
| | ----------------------------------------- the second-largest variant contains at least 64 bytes
477 | | }
| |_^ the entire enum is at least 344 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
|
470 - Judge(#[from] judge::Error),
470 + Judge(#[from] Box<judge::Error>),
|
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L333
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:333:46
|
333 | let (blanks, options) = load_payload(&***db, cloze.subtask_id).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L305
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:305:39
|
305 | let hydrated = hydrate_single(&***db, (updated, subtask)).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L303
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:303:26
|
303 | persist_prepared(&***db, cloze.subtask_id, &prepared).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L302
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:302:23
|
302 | reset_payload(&***db, cloze.subtask_id).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L244
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:244:39
|
244 | let hydrated = hydrate_single(&***db, (cloze.clone(), subtask.clone())).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L211
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:211:39
|
211 | let hydrated = hydrate_single(&***db, (cloze, subtask)).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L209
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:209:26
|
209 | persist_prepared(&***db, cloze.subtask_id, &prepared).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L143
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:143:47
|
143 | let hydrated = hydrate_single(&***db, item).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L113
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:113:47
|
113 | let hydrated = hydrate_single(&***db, item).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L84
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:84:37
|
84 | let hydrated = hydrate_many(&***db, entries).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
|
|
this boolean expression can be simplified:
challenges/src/endpoints/coding_challenges/submissions.rs#L600
warning: this boolean expression can be simplified
--> challenges/src/endpoints/coding_challenges/submissions.rs:600:12
|
600 | if !self
| ____________^
601 | | .ids
602 | | .get(&key)
603 | | .is_some_and(|&x| self.id_position(x) == 0)
| |_______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#nonminimal_bool
= note: `#[warn(clippy::nonminimal_bool)]` on by default
help: try
|
600 ~ if self
601 + .ids
602 + .get(&key).is_none_or(|&x| self.id_position(x) != 0)
|
|
|
large size difference between variants:
challenges/src/endpoints/coding_challenges/submissions.rs#L468
warning: large size difference between variants
--> challenges/src/endpoints/coding_challenges/submissions.rs:468:1
|
468 | / enum JudgeSubmissionError {
469 | | #[error("failed to judge submission: {0}")]
470 | | Judge(#[from] judge::Error),
| | --------------------------- the largest variant contains at least 344 bytes
471 | | #[error("database error: {0}")]
... |
476 | | TaskRewards(#[from] SendTaskRewardsError),
| | ----------------------------------------- the second-largest variant contains at least 64 bytes
477 | | }
| |_^ the entire enum is at least 344 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
|
470 - Judge(#[from] judge::Error),
470 + Judge(#[from] Box<judge::Error>),
|
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L333
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:333:46
|
333 | let (blanks, options) = load_payload(&***db, cloze.subtask_id).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L305
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:305:39
|
305 | let hydrated = hydrate_single(&***db, (updated, subtask)).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L303
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:303:26
|
303 | persist_prepared(&***db, cloze.subtask_id, &prepared).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L302
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:302:23
|
302 | reset_payload(&***db, cloze.subtask_id).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L244
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:244:39
|
244 | let hydrated = hydrate_single(&***db, (cloze.clone(), subtask.clone())).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L211
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:211:39
|
211 | let hydrated = hydrate_single(&***db, (cloze, subtask)).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L209
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:209:26
|
209 | persist_prepared(&***db, cloze.subtask_id, &prepared).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L143
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:143:47
|
143 | let hydrated = hydrate_single(&***db, item).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L113
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:113:47
|
113 | let hydrated = hydrate_single(&***db, item).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_auto_deref
|
|
deref which would be done by auto-deref:
challenges/src/endpoints/cloze.rs#L84
warning: deref which would be done by auto-deref
--> challenges/src/endpoints/cloze.rs:84:37
|
84 | let hydrated = hydrate_many(&***db, entries).await?;
| ^^^^^^ help: try: `&db`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
|