mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 00:00:03 +03:00
Compare commits
4 commits
ce3dcc9856
...
0b3ad9141b
Author | SHA1 | Date | |
---|---|---|---|
0b3ad9141b | |||
c903db5c53 | |||
8a038b946c | |||
ed9740b72c |
14
Cargo.toml
14
Cargo.toml
|
@ -69,6 +69,18 @@ panic = "abort"
|
||||||
[package.metadata.release]
|
[package.metadata.release]
|
||||||
pre-release-hook = ["./release-hook.sh"]
|
pre-release-hook = ["./release-hook.sh"]
|
||||||
|
|
||||||
|
[workspace.lints.rust]
|
||||||
|
unsafe_code = "forbid"
|
||||||
|
unstable_features = "forbid"
|
||||||
|
|
||||||
|
[workspace.lints.clippy]
|
||||||
|
empty_loop = "forbid"
|
||||||
|
infinite_loop = "deny"
|
||||||
|
mem_forget = "deny"
|
||||||
|
dbg_macro = "warn"
|
||||||
|
todo = "warn"
|
||||||
# TODO: Remove after the following fix is released: https://github.com/rust-lang/rust-clippy/pull/13102
|
# TODO: Remove after the following fix is released: https://github.com/rust-lang/rust-clippy/pull/13102
|
||||||
[lints.clippy]
|
|
||||||
needless_option_as_deref = "allow"
|
needless_option_as_deref = "allow"
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
|
@ -201,3 +201,19 @@ panic = "abort"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
panic = "abort"
|
panic = "abort"
|
||||||
|
|
||||||
|
[lints.rust]
|
||||||
|
# You shouldn't write unsafe code in Rustlings
|
||||||
|
unsafe_code = "forbid"
|
||||||
|
# You don't need unstable features in Rustlings and shouldn't rely on them while learning Rust
|
||||||
|
unstable_features = "forbid"
|
||||||
|
|
||||||
|
[lints.clippy]
|
||||||
|
# You forgot a `todo!()`
|
||||||
|
todo = "forbid"
|
||||||
|
# This can only happen by mistake in Rustlings
|
||||||
|
empty_loop = "forbid"
|
||||||
|
# No infinite loops are needed in Rustlings
|
||||||
|
infinite_loop = "deny"
|
||||||
|
# You shouldn't leak memory while still learning Rust
|
||||||
|
mem_forget = "deny"
|
||||||
|
|
|
@ -19,3 +19,6 @@ proc-macro = true
|
||||||
quote = "1.0.36"
|
quote = "1.0.36"
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
toml_edit.workspace = true
|
toml_edit.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
|
@ -35,7 +35,7 @@ fn build_scores_table(results: &str) -> HashMap<&str, TeamScores> {
|
||||||
team_1.goals_scored += team_1_score;
|
team_1.goals_scored += team_1_score;
|
||||||
team_1.goals_conceded += team_2_score;
|
team_1.goals_conceded += team_2_score;
|
||||||
|
|
||||||
// Similarely for the second team.
|
// Similarly for the second team.
|
||||||
let team_2 = scores
|
let team_2 = scores
|
||||||
.entry(team_2_name)
|
.entry(team_2_name)
|
||||||
.or_insert_with(TeamScores::default);
|
.or_insert_with(TeamScores::default);
|
||||||
|
|
Loading…
Reference in a new issue