diff --git a/exercises/concept/assembly-line/Cargo.toml b/exercises/concept/assembly-line/Cargo.toml index 5a7f2c4ca..b9ea4ccfa 100644 --- a/exercises/concept/assembly-line/Cargo.toml +++ b/exercises/concept/assembly-line/Cargo.toml @@ -1,4 +1,9 @@ [package] -name = "assembly-line" +name = "assembly_line" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/concept/csv-builder/Cargo.toml b/exercises/concept/csv-builder/Cargo.toml index 29b5af9ee..cf8a4454f 100644 --- a/exercises/concept/csv-builder/Cargo.toml +++ b/exercises/concept/csv-builder/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "csv_builder" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [lints.clippy] new_without_default = "allow" diff --git a/exercises/concept/health-statistics/Cargo.toml b/exercises/concept/health-statistics/Cargo.toml index 66b5fbc15..2374e2e21 100644 --- a/exercises/concept/health-statistics/Cargo.toml +++ b/exercises/concept/health-statistics/Cargo.toml @@ -1,4 +1,9 @@ [package] name = "health_statistics" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/concept/low-power-embedded-game/Cargo.toml b/exercises/concept/low-power-embedded-game/Cargo.toml index 8cfaf6aae..f589a4f72 100644 --- a/exercises/concept/low-power-embedded-game/Cargo.toml +++ b/exercises/concept/low-power-embedded-game/Cargo.toml @@ -1,4 +1,9 @@ [package] name = "low_power_embedded_game" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/concept/lucians-luscious-lasagna/Cargo.toml b/exercises/concept/lucians-luscious-lasagna/Cargo.toml index 6f8876654..88240adab 100644 --- a/exercises/concept/lucians-luscious-lasagna/Cargo.toml +++ b/exercises/concept/lucians-luscious-lasagna/Cargo.toml @@ -1,4 +1,9 @@ [package] -name = "lucians-luscious-lasagna" +name = "lucians_luscious_lasagna" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/concept/magazine-cutout/Cargo.toml b/exercises/concept/magazine-cutout/Cargo.toml index 2ad12cef8..358fc33b7 100644 --- a/exercises/concept/magazine-cutout/Cargo.toml +++ b/exercises/concept/magazine-cutout/Cargo.toml @@ -1,4 +1,9 @@ [package] name = "magazine_cutout" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/concept/resistor-color/Cargo.toml b/exercises/concept/resistor-color/Cargo.toml index 8c7709d35..04cab7865 100644 --- a/exercises/concept/resistor-color/Cargo.toml +++ b/exercises/concept/resistor-color/Cargo.toml @@ -1,8 +1,11 @@ [package] -edition = "2021" -name = "resistor-color" -version = "1.0.0" +name = "resistor_color" +version = "0.1.0" +edition = "2024" +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml [dependencies] int-enum = "0.5.0" enum-iterator = "1.2.0" diff --git a/exercises/concept/resistor-color/tests/resistor-color.rs b/exercises/concept/resistor-color/tests/resistor-color.rs index b0806797b..1c20e3217 100644 --- a/exercises/concept/resistor-color/tests/resistor-color.rs +++ b/exercises/concept/resistor-color/tests/resistor-color.rs @@ -1,4 +1,4 @@ -use resistor_color::{color_to_value, colors, value_to_color_string, ResistorColor}; +use resistor_color::{ResistorColor, color_to_value, colors, value_to_color_string}; #[test] fn black() { @@ -50,6 +50,8 @@ fn all_colors() { use ResistorColor::*; assert_eq!( colors(), - vec![Black, Brown, Red, Orange, Yellow, Green, Blue, Violet, Grey, White] + vec![ + Black, Brown, Red, Orange, Yellow, Green, Blue, Violet, Grey, White + ] ); } diff --git a/exercises/concept/role-playing-game/Cargo.toml b/exercises/concept/role-playing-game/Cargo.toml index ab9f24f21..4773e0985 100644 --- a/exercises/concept/role-playing-game/Cargo.toml +++ b/exercises/concept/role-playing-game/Cargo.toml @@ -1,4 +1,9 @@ [package] name = "role_playing_game" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/concept/rpn-calculator/Cargo.toml b/exercises/concept/rpn-calculator/Cargo.toml index 99ae2cf09..c712676eb 100644 --- a/exercises/concept/rpn-calculator/Cargo.toml +++ b/exercises/concept/rpn-calculator/Cargo.toml @@ -1,4 +1,9 @@ [package] name = "rpn_calculator" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/concept/semi-structured-logs/Cargo.toml b/exercises/concept/semi-structured-logs/Cargo.toml index 5e8e3d53e..a12cc4518 100644 --- a/exercises/concept/semi-structured-logs/Cargo.toml +++ b/exercises/concept/semi-structured-logs/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "semi_structured_logs" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [features] add-a-variant = [] diff --git a/exercises/concept/semi-structured-logs/tests/semi-structured-logs.rs b/exercises/concept/semi-structured-logs/tests/semi-structured-logs.rs index 04168b139..65eb4d5c9 100644 --- a/exercises/concept/semi-structured-logs/tests/semi-structured-logs.rs +++ b/exercises/concept/semi-structured-logs/tests/semi-structured-logs.rs @@ -1,4 +1,4 @@ -use semi_structured_logs::{error, info, log, warn, LogLevel}; +use semi_structured_logs::{LogLevel, error, info, log, warn}; #[test] fn emits_info() { diff --git a/exercises/concept/short-fibonacci/Cargo.toml b/exercises/concept/short-fibonacci/Cargo.toml index d2ee550cc..1740abd20 100644 --- a/exercises/concept/short-fibonacci/Cargo.toml +++ b/exercises/concept/short-fibonacci/Cargo.toml @@ -1,4 +1,9 @@ [package] name = "short_fibonacci" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/accumulate/Cargo.toml b/exercises/practice/accumulate/Cargo.toml index 795e2befd..05f075462 100644 --- a/exercises/practice/accumulate/Cargo.toml +++ b/exercises/practice/accumulate/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "accumulate" -version = "0.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/acronym/Cargo.toml b/exercises/practice/acronym/Cargo.toml index cc0c031d6..c83115be8 100644 --- a/exercises/practice/acronym/Cargo.toml +++ b/exercises/practice/acronym/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "acronym" -version = "1.7.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/affine-cipher/Cargo.toml b/exercises/practice/affine-cipher/Cargo.toml index 8f487a07f..979844792 100644 --- a/exercises/practice/affine-cipher/Cargo.toml +++ b/exercises/practice/affine-cipher/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "affine-cipher" -version = "2.0.0" +name = "affine_cipher" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/all-your-base/Cargo.toml b/exercises/practice/all-your-base/Cargo.toml index 8ecd11098..7e9f62613 100644 --- a/exercises/practice/all-your-base/Cargo.toml +++ b/exercises/practice/all-your-base/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "allyourbase" -version = "1.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/allergies/Cargo.toml b/exercises/practice/allergies/Cargo.toml index 7bd71fcf9..41adcdd93 100644 --- a/exercises/practice/allergies/Cargo.toml +++ b/exercises/practice/allergies/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "allergies" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/allergies/src/lib.rs b/exercises/practice/allergies/src/lib.rs index a2fd3088f..6ded730ed 100644 --- a/exercises/practice/allergies/src/lib.rs +++ b/exercises/practice/allergies/src/lib.rs @@ -22,6 +22,8 @@ impl Allergies { } pub fn allergies(&self) -> Vec { - todo!("Return the list of allergens contained within the score with which the Allergies struct was made."); + todo!( + "Return the list of allergens contained within the score with which the Allergies struct was made." + ); } } diff --git a/exercises/practice/alphametics/.meta/Cargo-example.toml b/exercises/practice/alphametics/.meta/Cargo-example.toml index a83ef229b..1c70f6e2f 100644 --- a/exercises/practice/alphametics/.meta/Cargo-example.toml +++ b/exercises/practice/alphametics/.meta/Cargo-example.toml @@ -1,8 +1,11 @@ [package] -edition = "2021" name = "alphametics" -version = "0.0.0" +version = "0.1.0" +edition = "2024" +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml [dependencies] itertools = "0.5" permutohedron = "0.2" diff --git a/exercises/practice/alphametics/Cargo.toml b/exercises/practice/alphametics/Cargo.toml index bef2c20db..f2bd83000 100644 --- a/exercises/practice/alphametics/Cargo.toml +++ b/exercises/practice/alphametics/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "alphametics" -version = "1.3.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/alphametics/tests/alphametics.rs b/exercises/practice/alphametics/tests/alphametics.rs index 06f2920bc..63817df8b 100644 --- a/exercises/practice/alphametics/tests/alphametics.rs +++ b/exercises/practice/alphametics/tests/alphametics.rs @@ -110,7 +110,9 @@ fn puzzle_with_ten_letters() { #[test] #[ignore] fn puzzle_with_ten_letters_and_199_addends() { - let answer = solve("THIS + A + FIRE + THEREFORE + FOR + ALL + HISTORIES + I + TELL + A + TALE + THAT + FALSIFIES + ITS + TITLE + TIS + A + LIE + THE + TALE + OF + THE + LAST + FIRE + HORSES + LATE + AFTER + THE + FIRST + FATHERS + FORESEE + THE + HORRORS + THE + LAST + FREE + TROLL + TERRIFIES + THE + HORSES + OF + FIRE + THE + TROLL + RESTS + AT + THE + HOLE + OF + LOSSES + IT + IS + THERE + THAT + SHE + STORES + ROLES + OF + LEATHERS + AFTER + SHE + SATISFIES + HER + HATE + OFF + THOSE + FEARS + A + TASTE + RISES + AS + SHE + HEARS + THE + LEAST + FAR + HORSE + THOSE + FAST + HORSES + THAT + FIRST + HEAR + THE + TROLL + FLEE + OFF + TO + THE + FOREST + THE + HORSES + THAT + ALERTS + RAISE + THE + STARES + OF + THE + OTHERS + AS + THE + TROLL + ASSAILS + AT + THE + TOTAL + SHIFT + HER + TEETH + TEAR + HOOF + OFF + TORSO + AS + THE + LAST + HORSE + FORFEITS + ITS + LIFE + THE + FIRST + FATHERS + HEAR + OF + THE + HORRORS + THEIR + FEARS + THAT + THE + FIRES + FOR + THEIR + FEASTS + ARREST + AS + THE + FIRST + FATHERS + RESETTLE + THE + LAST + OF + THE + FIRE + HORSES + THE + LAST + TROLL + HARASSES + THE + FOREST + HEART + FREE + AT + LAST + OF + THE + LAST + TROLL + ALL + OFFER + THEIR + FIRE + HEAT + TO + THE + ASSISTERS + FAR + OFF + THE + TROLL + FASTS + ITS + LIFE + SHORTER + AS + STARS + RISE + THE + HORSES + REST + SAFE + AFTER + ALL + SHARE + HOT + FISH + AS + THEIR + AFFILIATES + TAILOR + A + ROOFS + FOR + THEIR + SAFE == FORTRESSES"); + let answer = solve( + "THIS + A + FIRE + THEREFORE + FOR + ALL + HISTORIES + I + TELL + A + TALE + THAT + FALSIFIES + ITS + TITLE + TIS + A + LIE + THE + TALE + OF + THE + LAST + FIRE + HORSES + LATE + AFTER + THE + FIRST + FATHERS + FORESEE + THE + HORRORS + THE + LAST + FREE + TROLL + TERRIFIES + THE + HORSES + OF + FIRE + THE + TROLL + RESTS + AT + THE + HOLE + OF + LOSSES + IT + IS + THERE + THAT + SHE + STORES + ROLES + OF + LEATHERS + AFTER + SHE + SATISFIES + HER + HATE + OFF + THOSE + FEARS + A + TASTE + RISES + AS + SHE + HEARS + THE + LEAST + FAR + HORSE + THOSE + FAST + HORSES + THAT + FIRST + HEAR + THE + TROLL + FLEE + OFF + TO + THE + FOREST + THE + HORSES + THAT + ALERTS + RAISE + THE + STARES + OF + THE + OTHERS + AS + THE + TROLL + ASSAILS + AT + THE + TOTAL + SHIFT + HER + TEETH + TEAR + HOOF + OFF + TORSO + AS + THE + LAST + HORSE + FORFEITS + ITS + LIFE + THE + FIRST + FATHERS + HEAR + OF + THE + HORRORS + THEIR + FEARS + THAT + THE + FIRES + FOR + THEIR + FEASTS + ARREST + AS + THE + FIRST + FATHERS + RESETTLE + THE + LAST + OF + THE + FIRE + HORSES + THE + LAST + TROLL + HARASSES + THE + FOREST + HEART + FREE + AT + LAST + OF + THE + LAST + TROLL + ALL + OFFER + THEIR + FIRE + HEAT + TO + THE + ASSISTERS + FAR + OFF + THE + TROLL + FASTS + ITS + LIFE + SHORTER + AS + STARS + RISE + THE + HORSES + REST + SAFE + AFTER + ALL + SHARE + HOT + FISH + AS + THEIR + AFFILIATES + TAILOR + A + ROOFS + FOR + THEIR + SAFE == FORTRESSES", + ); let expected = [ ('A', 1), ('E', 0), diff --git a/exercises/practice/anagram/Cargo.toml b/exercises/practice/anagram/Cargo.toml index 5e06e4e55..f4381a85d 100644 --- a/exercises/practice/anagram/Cargo.toml +++ b/exercises/practice/anagram/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "anagram" -version = "0.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/armstrong-numbers/Cargo.toml b/exercises/practice/armstrong-numbers/Cargo.toml index 4949ea7fd..cb49ce6dc 100644 --- a/exercises/practice/armstrong-numbers/Cargo.toml +++ b/exercises/practice/armstrong-numbers/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "armstrong_numbers" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/atbash-cipher/Cargo.toml b/exercises/practice/atbash-cipher/Cargo.toml index 881ddf641..f2f21e973 100644 --- a/exercises/practice/atbash-cipher/Cargo.toml +++ b/exercises/practice/atbash-cipher/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "atbash-cipher" -version = "1.2.0" +name = "atbash_cipher" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/beer-song/Cargo.toml b/exercises/practice/beer-song/Cargo.toml index 11c518b4f..848f1827e 100644 --- a/exercises/practice/beer-song/Cargo.toml +++ b/exercises/practice/beer-song/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "beer-song" -version = "0.0.0" +name = "beer_song" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/binary-search/Cargo.toml b/exercises/practice/binary-search/Cargo.toml index 5e8ac2fd9..f7721fb90 100644 --- a/exercises/practice/binary-search/Cargo.toml +++ b/exercises/practice/binary-search/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" -name = "binary-search" -version = "1.3.0" +name = "binary_search" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [features] generic = [] diff --git a/exercises/practice/bob/Cargo.toml b/exercises/practice/bob/Cargo.toml index 1ea91729c..f7ab5ddcc 100644 --- a/exercises/practice/bob/Cargo.toml +++ b/exercises/practice/bob/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "bob" -version = "1.6.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/book-store/.meta/Cargo-example.toml b/exercises/practice/book-store/.meta/Cargo-example.toml index 767b9c1e8..2178d1a4d 100644 --- a/exercises/practice/book-store/.meta/Cargo-example.toml +++ b/exercises/practice/book-store/.meta/Cargo-example.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "book_store" -version = "1.3.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/book-store/Cargo.toml b/exercises/practice/book-store/Cargo.toml index 767b9c1e8..2178d1a4d 100644 --- a/exercises/practice/book-store/Cargo.toml +++ b/exercises/practice/book-store/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "book_store" -version = "1.3.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/book-store/tests/book-store.rs b/exercises/practice/book-store/tests/book-store.rs index 944139343..d61a40e53 100644 --- a/exercises/practice/book-store/tests/book-store.rs +++ b/exercises/practice/book-store/tests/book-store.rs @@ -136,8 +136,8 @@ fn four_groups_of_four_are_cheaper_than_two_groups_each_of_five_and_three() { #[test] #[ignore] -fn check_that_groups_of_four_are_created_properly_even_when_there_are_more_groups_of_three_than_groups_of_five( -) { +fn check_that_groups_of_four_are_created_properly_even_when_there_are_more_groups_of_three_than_groups_of_five() + { let input = &[ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, ]; diff --git a/exercises/practice/bottle-song/Cargo.toml b/exercises/practice/bottle-song/Cargo.toml index 2559e51b8..a133c667a 100644 --- a/exercises/practice/bottle-song/Cargo.toml +++ b/exercises/practice/bottle-song/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "bottle_song" -version = "1.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/bowling/Cargo.toml b/exercises/practice/bowling/Cargo.toml index e8ab79369..81023c878 100644 --- a/exercises/practice/bowling/Cargo.toml +++ b/exercises/practice/bowling/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" name = "bowling" -version = "1.2.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [lints.clippy] new_without_default = "allow" diff --git a/exercises/practice/bowling/tests/bowling.rs b/exercises/practice/bowling/tests/bowling.rs index 140a00527..906568f2f 100644 --- a/exercises/practice/bowling/tests/bowling.rs +++ b/exercises/practice/bowling/tests/bowling.rs @@ -315,8 +315,8 @@ fn two_bonus_rolls_after_a_strike_in_the_last_frame_cannot_score_more_than_10_po #[test] #[ignore] -fn two_bonus_rolls_after_a_strike_in_the_last_frame_can_score_more_than_10_points_if_one_is_a_strike( -) { +fn two_bonus_rolls_after_a_strike_in_the_last_frame_can_score_more_than_10_points_if_one_is_a_strike() + { let mut game = BowlingGame::new(); for _ in 0..18 { @@ -331,8 +331,8 @@ fn two_bonus_rolls_after_a_strike_in_the_last_frame_can_score_more_than_10_point #[test] #[ignore] -fn the_second_bonus_rolls_after_a_strike_in_the_last_frame_cannot_be_a_strike_if_the_first_one_is_not_a_strike( -) { +fn the_second_bonus_rolls_after_a_strike_in_the_last_frame_cannot_be_a_strike_if_the_first_one_is_not_a_strike() + { let mut game = BowlingGame::new(); for _ in 0..18 { diff --git a/exercises/practice/circular-buffer/Cargo.toml b/exercises/practice/circular-buffer/Cargo.toml index 63c8be965..89de6cb01 100644 --- a/exercises/practice/circular-buffer/Cargo.toml +++ b/exercises/practice/circular-buffer/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "circular-buffer" -version = "1.1.0" +name = "circular_buffer" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/circular-buffer/src/lib.rs b/exercises/practice/circular-buffer/src/lib.rs index 63686c805..93b54abf7 100644 --- a/exercises/practice/circular-buffer/src/lib.rs +++ b/exercises/practice/circular-buffer/src/lib.rs @@ -22,11 +22,15 @@ impl CircularBuffer { } pub fn write(&mut self, _element: T) -> Result<(), Error> { - todo!("Write the passed element to the CircularBuffer or return FullBuffer error if CircularBuffer is full."); + todo!( + "Write the passed element to the CircularBuffer or return FullBuffer error if CircularBuffer is full." + ); } pub fn read(&mut self) -> Result { - todo!("Read the oldest element from the CircularBuffer or return EmptyBuffer error if CircularBuffer is empty."); + todo!( + "Read the oldest element from the CircularBuffer or return EmptyBuffer error if CircularBuffer is empty." + ); } pub fn clear(&mut self) { @@ -34,6 +38,8 @@ impl CircularBuffer { } pub fn overwrite(&mut self, _element: T) { - todo!("Write the passed element to the CircularBuffer, overwriting the existing elements if CircularBuffer is full."); + todo!( + "Write the passed element to the CircularBuffer, overwriting the existing elements if CircularBuffer is full." + ); } } diff --git a/exercises/practice/clock/Cargo.toml b/exercises/practice/clock/Cargo.toml index 5c1ff8daf..79c6ff8e7 100644 --- a/exercises/practice/clock/Cargo.toml +++ b/exercises/practice/clock/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "clock" -version = "2.4.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/collatz-conjecture/Cargo.toml b/exercises/practice/collatz-conjecture/Cargo.toml index dd64fa792..4463d57e8 100644 --- a/exercises/practice/collatz-conjecture/Cargo.toml +++ b/exercises/practice/collatz-conjecture/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "collatz_conjecture" -version = "1.2.1" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/crypto-square/Cargo.toml b/exercises/practice/crypto-square/Cargo.toml index e617068eb..b8e23929a 100644 --- a/exercises/practice/crypto-square/Cargo.toml +++ b/exercises/practice/crypto-square/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "crypto-square" +name = "crypto_square" version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/custom-set/Cargo.toml b/exercises/practice/custom-set/Cargo.toml index d595327c1..e56e5dd82 100644 --- a/exercises/practice/custom-set/Cargo.toml +++ b/exercises/practice/custom-set/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "custom-set" -version = "1.0.1" +name = "custom_set" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/decimal/.meta/Cargo-example.toml b/exercises/practice/decimal/.meta/Cargo-example.toml index 96fbf9772..e2a4c289f 100644 --- a/exercises/practice/decimal/.meta/Cargo-example.toml +++ b/exercises/practice/decimal/.meta/Cargo-example.toml @@ -1,8 +1,11 @@ [package] -edition = "2021" name = "decimal" version = "0.1.0" +edition = "2024" +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml [dependencies] num-bigint = "0.4.4" num-traits = "0.2.16" diff --git a/exercises/practice/decimal/Cargo.toml b/exercises/practice/decimal/Cargo.toml index 6f1d36ac7..3a34b5801 100644 --- a/exercises/practice/decimal/Cargo.toml +++ b/exercises/practice/decimal/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "decimal" version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/diamond/Cargo.toml b/exercises/practice/diamond/Cargo.toml index 26c54dcc3..436ce7a0b 100644 --- a/exercises/practice/diamond/Cargo.toml +++ b/exercises/practice/diamond/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "diamond" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/difference-of-squares/Cargo.toml b/exercises/practice/difference-of-squares/Cargo.toml index 71d56f826..6b0bc15cd 100644 --- a/exercises/practice/difference-of-squares/Cargo.toml +++ b/exercises/practice/difference-of-squares/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "difference-of-squares" -version = "1.2.0" +name = "difference_of_squares" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/diffie-hellman/.meta/Cargo-example.toml b/exercises/practice/diffie-hellman/.meta/Cargo-example.toml index 49b664725..54647854c 100644 --- a/exercises/practice/diffie-hellman/.meta/Cargo-example.toml +++ b/exercises/practice/diffie-hellman/.meta/Cargo-example.toml @@ -1,8 +1,11 @@ [package] -edition = "2021" -name = "diffie-hellman" +name = "diffie_hellman" version = "0.1.0" +edition = "2024" +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml [dependencies] rand = "0.3.18" diff --git a/exercises/practice/diffie-hellman/Cargo.toml b/exercises/practice/diffie-hellman/Cargo.toml index 5b588a15e..82e5d871d 100644 --- a/exercises/practice/diffie-hellman/Cargo.toml +++ b/exercises/practice/diffie-hellman/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" -name = "diffie-hellman" +name = "diffie_hellman" version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [features] big-primes = [] diff --git a/exercises/practice/dominoes/Cargo.toml b/exercises/practice/dominoes/Cargo.toml index 1ecfccf0f..38fa62836 100644 --- a/exercises/practice/dominoes/Cargo.toml +++ b/exercises/practice/dominoes/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "dominoes" -version = "2.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/dominoes/src/lib.rs b/exercises/practice/dominoes/src/lib.rs index 3137bddc7..e1419acd4 100644 --- a/exercises/practice/dominoes/src/lib.rs +++ b/exercises/practice/dominoes/src/lib.rs @@ -1,3 +1,5 @@ pub fn chain(input: &[(u8, u8)]) -> Option> { - todo!("From the given input '{input:?}' construct a proper dominoes chain or return None if it is not possible."); + todo!( + "From the given input '{input:?}' construct a proper dominoes chain or return None if it is not possible." + ); } diff --git a/exercises/practice/dot-dsl/Cargo.toml b/exercises/practice/dot-dsl/Cargo.toml index 9361866ea..19072537d 100644 --- a/exercises/practice/dot-dsl/Cargo.toml +++ b/exercises/practice/dot-dsl/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" -name = "dot-dsl" +name = "dot_dsl" version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [lints.clippy] new_without_default = "allow" diff --git a/exercises/practice/doubly-linked-list/.meta/example.rs b/exercises/practice/doubly-linked-list/.meta/example.rs index d9b325ac3..f5c067fb5 100644 --- a/exercises/practice/doubly-linked-list/.meta/example.rs +++ b/exercises/practice/doubly-linked-list/.meta/example.rs @@ -62,8 +62,10 @@ impl Node { // `left` and `right` must point to adjacent nodes unsafe fn link(mut left: NodePtr, mut right: NodePtr) { - left.as_mut().next = Some(right); - right.as_mut().prev = Some(left); + unsafe { + left.as_mut().next = Some(right); + right.as_mut().prev = Some(left); + } } } @@ -164,11 +166,13 @@ impl Cursor<'_, T> { // a mutable reference to its element. // `get_next` must return None or a pointer owned by the linked list unsafe fn _step(&mut self, get_next: impl Fn(&Node) -> OptNodePtr) -> Option<&mut T> { - // safe due to L1: All NodePtrs are valid - let new_pos = get_next(self.node?.as_ref())?; - self.node = Some(new_pos); - // returning a mutable reference is safe for the same reason peek_mut() is safe - Some(&mut (*new_pos.as_ptr()).element) + unsafe { + // safe due to L1: All NodePtrs are valid + let new_pos = get_next(self.node?.as_ref())?; + self.node = Some(new_pos); + // returning a mutable reference is safe for the same reason peek_mut() is safe + Some(&mut (*new_pos.as_ptr()).element) + } } pub fn take(&mut self) -> Option { diff --git a/exercises/practice/doubly-linked-list/Cargo.toml b/exercises/practice/doubly-linked-list/Cargo.toml index 87094f3ae..0a620d9a2 100644 --- a/exercises/practice/doubly-linked-list/Cargo.toml +++ b/exercises/practice/doubly-linked-list/Cargo.toml @@ -1,7 +1,12 @@ [package] -name = "doubly-linked-list" -version = "0.0.0" -edition = "2021" +name = "doubly_linked_list" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [features] # check correct covariance and Send, Sync diff --git a/exercises/practice/doubly-linked-list/tests/step_4_leak_test_1.rs b/exercises/practice/doubly-linked-list/tests/step_4_leak_test_1.rs index 34df209a8..ea84c886a 100644 --- a/exercises/practice/doubly-linked-list/tests/step_4_leak_test_1.rs +++ b/exercises/practice/doubly-linked-list/tests/step_4_leak_test_1.rs @@ -34,7 +34,7 @@ struct Counter; unsafe impl GlobalAlloc for Counter { unsafe fn alloc(&self, layout: Layout) -> *mut u8 { - let ret = System.alloc(layout); + let ret = unsafe { System.alloc(layout) }; if !ret.is_null() { ALLOCATED.fetch_add(layout.size(), SeqCst); } @@ -42,7 +42,7 @@ unsafe impl GlobalAlloc for Counter { } unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { - System.dealloc(ptr, layout); + unsafe { System.dealloc(ptr, layout) }; ALLOCATED.fetch_sub(layout.size(), SeqCst); } } diff --git a/exercises/practice/doubly-linked-list/tests/step_4_leak_test_2.rs b/exercises/practice/doubly-linked-list/tests/step_4_leak_test_2.rs index c55b6b64c..12bbe0848 100644 --- a/exercises/practice/doubly-linked-list/tests/step_4_leak_test_2.rs +++ b/exercises/practice/doubly-linked-list/tests/step_4_leak_test_2.rs @@ -34,7 +34,7 @@ struct Counter; unsafe impl GlobalAlloc for Counter { unsafe fn alloc(&self, layout: Layout) -> *mut u8 { - let ret = System.alloc(layout); + let ret = unsafe { System.alloc(layout) }; if !ret.is_null() { ALLOCATED.fetch_add(layout.size(), SeqCst); } @@ -42,7 +42,7 @@ unsafe impl GlobalAlloc for Counter { } unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { - System.dealloc(ptr, layout); + unsafe { System.dealloc(ptr, layout) }; ALLOCATED.fetch_sub(layout.size(), SeqCst); } } diff --git a/exercises/practice/eliuds-eggs/Cargo.toml b/exercises/practice/eliuds-eggs/Cargo.toml index b76c171e1..ae51b9c42 100644 --- a/exercises/practice/eliuds-eggs/Cargo.toml +++ b/exercises/practice/eliuds-eggs/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "eliuds_eggs" -version = "1.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/etl/Cargo.toml b/exercises/practice/etl/Cargo.toml index 67624abea..a63ea7951 100644 --- a/exercises/practice/etl/Cargo.toml +++ b/exercises/practice/etl/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "etl" -version = "1.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/fizzy/.meta/example.rs b/exercises/practice/fizzy/.meta/example.rs index 28e2dee98..3543dcb12 100644 --- a/exercises/practice/fizzy/.meta/example.rs +++ b/exercises/practice/fizzy/.meta/example.rs @@ -39,7 +39,7 @@ where } pub fn apply_to(&self, item: T) -> String { - let Fizzy(ref matchers) = self; + let Fizzy(matchers) = self; let mut out = String::new(); for matcher in matchers { if (matcher.matcher)(item) { diff --git a/exercises/practice/fizzy/Cargo.toml b/exercises/practice/fizzy/Cargo.toml index 3992643de..0a1c3df13 100644 --- a/exercises/practice/fizzy/Cargo.toml +++ b/exercises/practice/fizzy/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "fizzy" -version = "0.0.0" -edition = "2021" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [lints.clippy] new_without_default = "allow" diff --git a/exercises/practice/fizzy/tests/fizzy.rs b/exercises/practice/fizzy/tests/fizzy.rs index 517fcc194..af84d6f91 100644 --- a/exercises/practice/fizzy/tests/fizzy.rs +++ b/exercises/practice/fizzy/tests/fizzy.rs @@ -92,7 +92,7 @@ fn minimal_generic_bounds() { impl fmt::Display for Fizzable { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let Fizzable(ref n) = self; + let Fizzable(n) = self; write!(f, "{n}") } } diff --git a/exercises/practice/forth/Cargo.toml b/exercises/practice/forth/Cargo.toml index 04e076d08..797644054 100644 --- a/exercises/practice/forth/Cargo.toml +++ b/exercises/practice/forth/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" name = "forth" -version = "1.7.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [lints.clippy] new_without_default = "allow" diff --git a/exercises/practice/forth/tests/alloc-attack.rs b/exercises/practice/forth/tests/alloc-attack.rs index 861dfe733..0ea591a93 100644 --- a/exercises/practice/forth/tests/alloc-attack.rs +++ b/exercises/practice/forth/tests/alloc-attack.rs @@ -76,11 +76,11 @@ struct TrackingAllocator(A, AtomicU64); unsafe impl GlobalAlloc for TrackingAllocator { unsafe fn alloc(&self, layout: Layout) -> *mut u8 { self.1.fetch_add(layout.size() as u64, Ordering::SeqCst); - self.0.alloc(layout) + unsafe { self.0.alloc(layout) } } unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { - self.0.dealloc(ptr, layout); + unsafe { self.0.dealloc(ptr, layout) }; self.1.fetch_sub(layout.size() as u64, Ordering::SeqCst); } } diff --git a/exercises/practice/gigasecond/Cargo.toml b/exercises/practice/gigasecond/Cargo.toml index da110b7b2..826b09466 100644 --- a/exercises/practice/gigasecond/Cargo.toml +++ b/exercises/practice/gigasecond/Cargo.toml @@ -1,7 +1,10 @@ [package] -edition = "2021" name = "gigasecond" -version = "2.0.0" +version = "0.1.0" +edition = "2024" +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml [dependencies] time = "0.3" diff --git a/exercises/practice/grade-school/Cargo.toml b/exercises/practice/grade-school/Cargo.toml index c8f979a76..b31ba7356 100644 --- a/exercises/practice/grade-school/Cargo.toml +++ b/exercises/practice/grade-school/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" -name = "grade-school" -version = "0.0.0" +name = "grade_school" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [lints.clippy] new_without_default = "allow" diff --git a/exercises/practice/grains/Cargo.toml b/exercises/practice/grains/Cargo.toml index 077822d61..d63ba538f 100644 --- a/exercises/practice/grains/Cargo.toml +++ b/exercises/practice/grains/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "grains" -version = "1.2.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/grep/.meta/Cargo-example.toml b/exercises/practice/grep/.meta/Cargo-example.toml index 367d28094..c11e06f02 100644 --- a/exercises/practice/grep/.meta/Cargo-example.toml +++ b/exercises/practice/grep/.meta/Cargo-example.toml @@ -1,8 +1,11 @@ +[package] +name = "grep" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml [dependencies] anyhow = "1.0" thiserror = "1.0" - -[package] -edition = "2021" -name = "grep" -version = "1.3.0" diff --git a/exercises/practice/grep/Cargo.toml b/exercises/practice/grep/Cargo.toml index fd0a6b754..90779a2c0 100644 --- a/exercises/practice/grep/Cargo.toml +++ b/exercises/practice/grep/Cargo.toml @@ -1,7 +1,10 @@ -[dependencies] -anyhow = "1.0" - [package] -edition = "2021" name = "grep" -version = "1.3.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] +anyhow = "1.0" diff --git a/exercises/practice/hamming/Cargo.toml b/exercises/practice/hamming/Cargo.toml index 0217a7a93..085746843 100644 --- a/exercises/practice/hamming/Cargo.toml +++ b/exercises/practice/hamming/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "hamming" -version = "2.2.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/hello-world/Cargo.toml b/exercises/practice/hello-world/Cargo.toml index face5dfd5..e780cd474 100644 --- a/exercises/practice/hello-world/Cargo.toml +++ b/exercises/practice/hello-world/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "hello-world" -version = "1.1.0" +name = "hello_world" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/hexadecimal/Cargo.toml b/exercises/practice/hexadecimal/Cargo.toml index 313084bc0..1840732aa 100644 --- a/exercises/practice/hexadecimal/Cargo.toml +++ b/exercises/practice/hexadecimal/Cargo.toml @@ -1,3 +1,9 @@ [package] name = "hexadecimal" -version = "0.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/high-scores/Cargo.toml b/exercises/practice/high-scores/Cargo.toml index 78c9a491c..1e3a7727f 100644 --- a/exercises/practice/high-scores/Cargo.toml +++ b/exercises/practice/high-scores/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "high-scores" -version = "4.0.0" +name = "high_scores" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/isbn-verifier/Cargo.toml b/exercises/practice/isbn-verifier/Cargo.toml index b355e387a..af7053701 100644 --- a/exercises/practice/isbn-verifier/Cargo.toml +++ b/exercises/practice/isbn-verifier/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "isbn-verifier" -version = "2.7.0" +name = "isbn_verifier" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/isogram/Cargo.toml b/exercises/practice/isogram/Cargo.toml index 671cd99d7..4af75dc7a 100644 --- a/exercises/practice/isogram/Cargo.toml +++ b/exercises/practice/isogram/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "isogram" -version = "1.3.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/kindergarten-garden/Cargo.toml b/exercises/practice/kindergarten-garden/Cargo.toml index 1c8ddf929..b5edfd55e 100644 --- a/exercises/practice/kindergarten-garden/Cargo.toml +++ b/exercises/practice/kindergarten-garden/Cargo.toml @@ -1,4 +1,9 @@ [package] name = "kindergarten_garden" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/knapsack/Cargo.toml b/exercises/practice/knapsack/Cargo.toml index 30ab86843..71cc438ba 100644 --- a/exercises/practice/knapsack/Cargo.toml +++ b/exercises/practice/knapsack/Cargo.toml @@ -1,4 +1,9 @@ [package] name = "knapsack" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/largest-series-product/Cargo.toml b/exercises/practice/largest-series-product/Cargo.toml index 16e2defe5..ee231d49d 100644 --- a/exercises/practice/largest-series-product/Cargo.toml +++ b/exercises/practice/largest-series-product/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "largest-series-product" -version = "1.2.0" +name = "largest_series_product" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/leap/Cargo.toml b/exercises/practice/leap/Cargo.toml index af7835945..fa2e07b33 100644 --- a/exercises/practice/leap/Cargo.toml +++ b/exercises/practice/leap/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "leap" -version = "1.6.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/list-ops/Cargo.toml b/exercises/practice/list-ops/Cargo.toml index eccd51cf6..2637d4f1c 100644 --- a/exercises/practice/list-ops/Cargo.toml +++ b/exercises/practice/list-ops/Cargo.toml @@ -1,4 +1,9 @@ [package] -name = "list-ops" +name = "list_ops" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/luhn-from/Cargo.toml b/exercises/practice/luhn-from/Cargo.toml index 2254dfa38..d5437b4df 100644 --- a/exercises/practice/luhn-from/Cargo.toml +++ b/exercises/practice/luhn-from/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "luhn-from" -version = "0.0.0" +name = "luhn_from" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/luhn-trait/Cargo.toml b/exercises/practice/luhn-trait/Cargo.toml index 75fa75d93..ff34e58ee 100644 --- a/exercises/practice/luhn-trait/Cargo.toml +++ b/exercises/practice/luhn-trait/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "luhn-trait" -version = "0.0.0" +name = "luhn_trait" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/luhn/Cargo.toml b/exercises/practice/luhn/Cargo.toml index 2c4011487..4a36628c1 100644 --- a/exercises/practice/luhn/Cargo.toml +++ b/exercises/practice/luhn/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "luhn" -version = "1.6.1" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/macros/Cargo.toml b/exercises/practice/macros/Cargo.toml index 4497ae5d8..8161a0872 100644 --- a/exercises/practice/macros/Cargo.toml +++ b/exercises/practice/macros/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "macros" version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/matching-brackets/Cargo.toml b/exercises/practice/matching-brackets/Cargo.toml index 55b42afb7..3c9770b69 100644 --- a/exercises/practice/matching-brackets/Cargo.toml +++ b/exercises/practice/matching-brackets/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "matching-brackets" -version = "2.0.0" +name = "matching_brackets" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/matrix/Cargo.toml b/exercises/practice/matrix/Cargo.toml index 7797f0f17..1247a58c2 100644 --- a/exercises/practice/matrix/Cargo.toml +++ b/exercises/practice/matrix/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "matrix" -version = "1.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/minesweeper/Cargo.toml b/exercises/practice/minesweeper/Cargo.toml index 5b53e2644..e64ff1b08 100644 --- a/exercises/practice/minesweeper/Cargo.toml +++ b/exercises/practice/minesweeper/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "minesweeper" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/minesweeper/src/lib.rs b/exercises/practice/minesweeper/src/lib.rs index 55f516ca5..c19457694 100644 --- a/exercises/practice/minesweeper/src/lib.rs +++ b/exercises/practice/minesweeper/src/lib.rs @@ -1,3 +1,5 @@ pub fn annotate(minefield: &[&str]) -> Vec { - todo!("\nAnnotate each square of the given minefield with the number of mines that surround said square (blank if there are no surrounding mines):\n{minefield:#?}\n"); + todo!( + "\nAnnotate each square of the given minefield with the number of mines that surround said square (blank if there are no surrounding mines):\n{minefield:#?}\n" + ); } diff --git a/exercises/practice/nth-prime/Cargo.toml b/exercises/practice/nth-prime/Cargo.toml index e40ac1e89..ce719bcd8 100644 --- a/exercises/practice/nth-prime/Cargo.toml +++ b/exercises/practice/nth-prime/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "nth_prime" -version = "2.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/nucleotide-codons/Cargo.toml b/exercises/practice/nucleotide-codons/Cargo.toml index ff77d8534..a39d46657 100644 --- a/exercises/practice/nucleotide-codons/Cargo.toml +++ b/exercises/practice/nucleotide-codons/Cargo.toml @@ -1,3 +1,9 @@ [package] name = "nucleotide_codons" version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/nucleotide-codons/src/lib.rs b/exercises/practice/nucleotide-codons/src/lib.rs index 17a6829b3..29460af9b 100644 --- a/exercises/practice/nucleotide-codons/src/lib.rs +++ b/exercises/practice/nucleotide-codons/src/lib.rs @@ -23,7 +23,10 @@ impl<'a> CodonsInfo<'a> { } pub fn of_rna(&self, rna: &str) -> Result, Error> { - todo!("Return a list of protein names that correspond to the '{}' RNA string or Err if the RNA string is invalid", rna); + todo!( + "Return a list of protein names that correspond to the '{}' RNA string or Err if the RNA string is invalid", + rna + ); } } diff --git a/exercises/practice/nucleotide-count/Cargo.toml b/exercises/practice/nucleotide-count/Cargo.toml index 97d8007e1..2a1ef9ab3 100644 --- a/exercises/practice/nucleotide-count/Cargo.toml +++ b/exercises/practice/nucleotide-count/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "nucleotide-count" -version = "1.3.0" +name = "nucleotide_count" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/ocr-numbers/Cargo.toml b/exercises/practice/ocr-numbers/Cargo.toml index 2f0af9aea..e99b7d21b 100644 --- a/exercises/practice/ocr-numbers/Cargo.toml +++ b/exercises/practice/ocr-numbers/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "ocr-numbers" -version = "0.0.0" +name = "ocr_numbers" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/paasio/Cargo.toml b/exercises/practice/paasio/Cargo.toml index 91ee30182..a6924c751 100644 --- a/exercises/practice/paasio/Cargo.toml +++ b/exercises/practice/paasio/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "paasio" -version = "0.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/palindrome-products/Cargo.toml b/exercises/practice/palindrome-products/Cargo.toml index 987f9015b..6629a3933 100644 --- a/exercises/practice/palindrome-products/Cargo.toml +++ b/exercises/practice/palindrome-products/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "palindrome-products" -version = "1.2.0" +name = "palindrome_products" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/pangram/Cargo.toml b/exercises/practice/pangram/Cargo.toml index 1d64635aa..6a9e01b8f 100644 --- a/exercises/practice/pangram/Cargo.toml +++ b/exercises/practice/pangram/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "pangram" -version = "0.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/parallel-letter-frequency/Cargo.toml b/exercises/practice/parallel-letter-frequency/Cargo.toml index 8caaa081b..9885e321c 100644 --- a/exercises/practice/parallel-letter-frequency/Cargo.toml +++ b/exercises/practice/parallel-letter-frequency/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "parallel-letter-frequency" -version = "0.0.0" +name = "parallel_letter_frequency" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/pascals-triangle/Cargo.toml b/exercises/practice/pascals-triangle/Cargo.toml index 40e039fa8..c703118e0 100644 --- a/exercises/practice/pascals-triangle/Cargo.toml +++ b/exercises/practice/pascals-triangle/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "pascals-triangle" -version = "1.5.0" +name = "pascals_triangle" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/perfect-numbers/Cargo.toml b/exercises/practice/perfect-numbers/Cargo.toml index 39a1ec152..a096fd0dd 100644 --- a/exercises/practice/perfect-numbers/Cargo.toml +++ b/exercises/practice/perfect-numbers/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "perfect_numbers" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/phone-number/Cargo.toml b/exercises/practice/phone-number/Cargo.toml index a8fb61d48..e7dd2918d 100644 --- a/exercises/practice/phone-number/Cargo.toml +++ b/exercises/practice/phone-number/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "phone-number" -version = "1.6.1" +name = "phone_number" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/pig-latin/.meta/Cargo-example.toml b/exercises/practice/pig-latin/.meta/Cargo-example.toml index 42bcba31f..3a976347f 100644 --- a/exercises/practice/pig-latin/.meta/Cargo-example.toml +++ b/exercises/practice/pig-latin/.meta/Cargo-example.toml @@ -1,7 +1,10 @@ [package] -edition = "2021" -name = "pig-latin" -version = "1.0.0" +name = "pig_latin" +version = "0.1.0" +edition = "2024" +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml [dependencies] regex = "0.2" diff --git a/exercises/practice/pig-latin/Cargo.toml b/exercises/practice/pig-latin/Cargo.toml index d7ab70e86..4dc02d93f 100644 --- a/exercises/practice/pig-latin/Cargo.toml +++ b/exercises/practice/pig-latin/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "pig-latin" -version = "1.0.0" +name = "pig_latin" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/poker/.meta/Cargo-example.toml b/exercises/practice/poker/.meta/Cargo-example.toml index 5b66e0ebf..23533088f 100644 --- a/exercises/practice/poker/.meta/Cargo-example.toml +++ b/exercises/practice/poker/.meta/Cargo-example.toml @@ -1,7 +1,10 @@ [package] -edition = "2021" name = "poker" -version = "1.0.0" +version = "0.1.0" +edition = "2024" +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml [dependencies] counter = "0.5.2" diff --git a/exercises/practice/poker/Cargo.toml b/exercises/practice/poker/Cargo.toml index 208d0e94c..539ae7925 100644 --- a/exercises/practice/poker/Cargo.toml +++ b/exercises/practice/poker/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "poker" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/poker/tests/poker.rs b/exercises/practice/poker/tests/poker.rs index f15029ec7..484451145 100644 --- a/exercises/practice/poker/tests/poker.rs +++ b/exercises/practice/poker/tests/poker.rs @@ -153,8 +153,8 @@ fn both_hands_have_three_of_a_kind_tie_goes_to_highest_ranked_triplet() { #[test] #[ignore] -fn with_multiple_decks_two_players_can_have_same_three_of_a_kind_ties_go_to_highest_remaining_cards( -) { +fn with_multiple_decks_two_players_can_have_same_three_of_a_kind_ties_go_to_highest_remaining_cards() + { let input = &["5S AH AS 7C AD", "4S AH AS 8C AD"]; let output = winning_hands(input).into_iter().collect::>(); let expected = ["4S AH AS 8C AD"].into_iter().collect::>(); diff --git a/exercises/practice/prime-factors/Cargo.toml b/exercises/practice/prime-factors/Cargo.toml index 44211ce91..0c8df82f4 100644 --- a/exercises/practice/prime-factors/Cargo.toml +++ b/exercises/practice/prime-factors/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "prime_factors" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/protein-translation/Cargo.toml b/exercises/practice/protein-translation/Cargo.toml index ce59d44a8..82be0604b 100644 --- a/exercises/practice/protein-translation/Cargo.toml +++ b/exercises/practice/protein-translation/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "protein-translation" +name = "protein_translation" version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/protein-translation/src/lib.rs b/exercises/practice/protein-translation/src/lib.rs index ddbfc80dc..b5ba6a902 100644 --- a/exercises/practice/protein-translation/src/lib.rs +++ b/exercises/practice/protein-translation/src/lib.rs @@ -1,3 +1,5 @@ pub fn translate(rna: &str) -> Option> { - todo!("Return a list of protein names that correspond to the '{rna}' RNA string or None if the RNA string is invalid"); + todo!( + "Return a list of protein names that correspond to the '{rna}' RNA string or None if the RNA string is invalid" + ); } diff --git a/exercises/practice/proverb/Cargo.toml b/exercises/practice/proverb/Cargo.toml index 8f9444d35..3ea43d7a3 100644 --- a/exercises/practice/proverb/Cargo.toml +++ b/exercises/practice/proverb/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "proverb" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/pythagorean-triplet/Cargo.toml b/exercises/practice/pythagorean-triplet/Cargo.toml index 27e28c0c3..12d11014a 100644 --- a/exercises/practice/pythagorean-triplet/Cargo.toml +++ b/exercises/practice/pythagorean-triplet/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "pythagorean_triplet" -version = "1.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/pythagorean-triplet/src/lib.rs b/exercises/practice/pythagorean-triplet/src/lib.rs index 45aa4a457..e645ab1f3 100644 --- a/exercises/practice/pythagorean-triplet/src/lib.rs +++ b/exercises/practice/pythagorean-triplet/src/lib.rs @@ -1,5 +1,7 @@ use std::collections::HashSet; pub fn find(sum: u32) -> HashSet<[u32; 3]> { - todo!("Given the sum {sum}, return all possible Pythagorean triplets, which produce the said sum, or an empty HashSet if there are no such triplets. Note that you are expected to return triplets in [a, b, c] order, where a < b < c"); + todo!( + "Given the sum {sum}, return all possible Pythagorean triplets, which produce the said sum, or an empty HashSet if there are no such triplets. Note that you are expected to return triplets in [a, b, c] order, where a < b < c" + ); } diff --git a/exercises/practice/queen-attack/Cargo.toml b/exercises/practice/queen-attack/Cargo.toml index e642e0ae7..a2c251524 100644 --- a/exercises/practice/queen-attack/Cargo.toml +++ b/exercises/practice/queen-attack/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "queen-attack" -version = "2.2.0" +name = "queen_attack" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/queen-attack/tests/queen-attack.rs b/exercises/practice/queen-attack/tests/queen-attack.rs index b8e023c96..cb37dfcd5 100644 --- a/exercises/practice/queen-attack/tests/queen-attack.rs +++ b/exercises/practice/queen-attack/tests/queen-attack.rs @@ -92,8 +92,8 @@ fn can_attack_on_fourth_diagonal() { #[test] #[ignore] -fn cannot_attack_if_falling_diagonals_are_only_the_same_when_reflected_across_the_longest_falling_diagonal( -) { +fn cannot_attack_if_falling_diagonals_are_only_the_same_when_reflected_across_the_longest_falling_diagonal() + { let white_queen = Queen::new(ChessPosition::new(4, 1).unwrap()); let black_queen = Queen::new(ChessPosition::new(2, 5).unwrap()); assert!(!white_queen.can_attack(&black_queen)); diff --git a/exercises/practice/rail-fence-cipher/Cargo.toml b/exercises/practice/rail-fence-cipher/Cargo.toml index 82030937b..1e9644ee8 100644 --- a/exercises/practice/rail-fence-cipher/Cargo.toml +++ b/exercises/practice/rail-fence-cipher/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "rail_fence_cipher" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/raindrops/Cargo.toml b/exercises/practice/raindrops/Cargo.toml index 41c138c6b..a297d155b 100644 --- a/exercises/practice/raindrops/Cargo.toml +++ b/exercises/practice/raindrops/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "raindrops" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/react/Cargo.toml b/exercises/practice/react/Cargo.toml index 3d2ebf0ad..171fe4d01 100644 --- a/exercises/practice/react/Cargo.toml +++ b/exercises/practice/react/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" name = "react" -version = "2.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [lints.clippy] new_without_default = "allow" diff --git a/exercises/practice/react/tests/react.rs b/exercises/practice/react/tests/react.rs index 1735e6632..3683a98f3 100644 --- a/exercises/practice/react/tests/react.rs +++ b/exercises/practice/react/tests/react.rs @@ -169,9 +169,11 @@ fn compute_cells_fire_callbacks() { let output = reactor .create_compute(&[CellId::Input(input)], |v| v[0] + 1) .unwrap(); - assert!(reactor - .add_callback(output, |v| cb.callback_called(v)) - .is_some()); + assert!( + reactor + .add_callback(output, |v| cb.callback_called(v)) + .is_some() + ); assert!(reactor.set_value(input, 3)); cb.expect_to_have_been_called_with(4); } @@ -226,9 +228,11 @@ fn callbacks_only_fire_on_change() { |v| if v[0] < 3 { 111 } else { 222 }, ) .unwrap(); - assert!(reactor - .add_callback(output, |v| cb.callback_called(v)) - .is_some()); + assert!( + reactor + .add_callback(output, |v| cb.callback_called(v)) + .is_some() + ); assert!(reactor.set_value(input, 2)); cb.expect_not_to_have_been_called(); @@ -245,9 +249,11 @@ fn callbacks_can_be_called_multiple_times() { let output = reactor .create_compute(&[CellId::Input(input)], |v| v[0] + 1) .unwrap(); - assert!(reactor - .add_callback(output, |v| cb.callback_called(v)) - .is_some()); + assert!( + reactor + .add_callback(output, |v| cb.callback_called(v)) + .is_some() + ); assert!(reactor.set_value(input, 2)); cb.expect_to_have_been_called_with(3); @@ -268,12 +274,16 @@ fn callbacks_can_be_called_from_multiple_cells() { let minus_one = reactor .create_compute(&[CellId::Input(input)], |v| v[0] - 1) .unwrap(); - assert!(reactor - .add_callback(plus_one, |v| cb1.callback_called(v)) - .is_some()); - assert!(reactor - .add_callback(minus_one, |v| cb2.callback_called(v)) - .is_some()); + assert!( + reactor + .add_callback(plus_one, |v| cb1.callback_called(v)) + .is_some() + ); + assert!( + reactor + .add_callback(minus_one, |v| cb2.callback_called(v)) + .is_some() + ); assert!(reactor.set_value(input, 10)); cb1.expect_to_have_been_called_with(11); @@ -296,18 +306,22 @@ fn callbacks_can_be_added_and_removed() { let callback = reactor .add_callback(output, |v| cb1.callback_called(v)) .unwrap(); - assert!(reactor - .add_callback(output, |v| cb2.callback_called(v)) - .is_some()); + assert!( + reactor + .add_callback(output, |v| cb2.callback_called(v)) + .is_some() + ); assert!(reactor.set_value(input, 31)); cb1.expect_to_have_been_called_with(32); cb2.expect_to_have_been_called_with(32); assert!(reactor.remove_callback(output, callback).is_ok()); - assert!(reactor - .add_callback(output, |v| cb3.callback_called(v)) - .is_some()); + assert!( + reactor + .add_callback(output, |v| cb3.callback_called(v)) + .is_some() + ); assert!(reactor.set_value(input, 41)); cb1.expect_not_to_have_been_called(); @@ -329,9 +343,11 @@ fn removing_a_callback_multiple_times_doesnt_interfere_with_other_callbacks() { let callback = reactor .add_callback(output, |v| cb1.callback_called(v)) .unwrap(); - assert!(reactor - .add_callback(output, |v| cb2.callback_called(v)) - .is_some()); + assert!( + reactor + .add_callback(output, |v| cb2.callback_called(v)) + .is_some() + ); // We want the first remove to be Ok, but the others should be errors. assert!(reactor.remove_callback(output, callback).is_ok()); for _ in 1..5 { @@ -367,9 +383,11 @@ fn callbacks_should_only_be_called_once_even_if_multiple_dependencies_change() { |v| v[0] * v[1], ) .unwrap(); - assert!(reactor - .add_callback(output, |v| cb.callback_called(v)) - .is_some()); + assert!( + reactor + .add_callback(output, |v| cb.callback_called(v)) + .is_some() + ); assert!(reactor.set_value(input, 4)); cb.expect_to_have_been_called_with(10); } @@ -392,9 +410,11 @@ fn callbacks_should_not_be_called_if_dependencies_change_but_output_value_doesnt |v| v[0] - v[1], ) .unwrap(); - assert!(reactor - .add_callback(always_two, |v| cb.callback_called(v)) - .is_some()); + assert!( + reactor + .add_callback(always_two, |v| cb.callback_called(v)) + .is_some() + ); for i in 2..5 { assert!(reactor.set_value(input, i)); cb.expect_not_to_have_been_called(); diff --git a/exercises/practice/rectangles/Cargo.toml b/exercises/practice/rectangles/Cargo.toml index 320d33678..27b83075f 100644 --- a/exercises/practice/rectangles/Cargo.toml +++ b/exercises/practice/rectangles/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "rectangles" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/rectangles/src/lib.rs b/exercises/practice/rectangles/src/lib.rs index 118113a8f..90fe2c037 100644 --- a/exercises/practice/rectangles/src/lib.rs +++ b/exercises/practice/rectangles/src/lib.rs @@ -1,3 +1,5 @@ pub fn count(lines: &[&str]) -> u32 { - todo!("\nDetermine the count of rectangles in the ASCII diagram represented by the following lines:\n{lines:#?}\n."); + todo!( + "\nDetermine the count of rectangles in the ASCII diagram represented by the following lines:\n{lines:#?}\n." + ); } diff --git a/exercises/practice/reverse-string/Cargo.toml b/exercises/practice/reverse-string/Cargo.toml index 403e50ab1..30529e8cb 100644 --- a/exercises/practice/reverse-string/Cargo.toml +++ b/exercises/practice/reverse-string/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" name = "reverse_string" -version = "1.2.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [features] grapheme = [] diff --git a/exercises/practice/rna-transcription/Cargo.toml b/exercises/practice/rna-transcription/Cargo.toml index 6307cb6e1..acb68cde0 100644 --- a/exercises/practice/rna-transcription/Cargo.toml +++ b/exercises/practice/rna-transcription/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "rna-transcription" -version = "1.0.0" +name = "rna_transcription" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/rna-transcription/src/lib.rs b/exercises/practice/rna-transcription/src/lib.rs index 9a406c460..c235cfad3 100644 --- a/exercises/practice/rna-transcription/src/lib.rs +++ b/exercises/practice/rna-transcription/src/lib.rs @@ -6,7 +6,9 @@ pub struct Rna; impl Dna { pub fn new(dna: &str) -> Result { - todo!("Construct new Dna from '{dna}' string. If string contains invalid nucleotides return index of first invalid nucleotide"); + todo!( + "Construct new Dna from '{dna}' string. If string contains invalid nucleotides return index of first invalid nucleotide" + ); } pub fn into_rna(self) -> Rna { @@ -16,6 +18,8 @@ impl Dna { impl Rna { pub fn new(rna: &str) -> Result { - todo!("Construct new Rna from '{rna}' string. If string contains invalid nucleotides return index of first invalid nucleotide"); + todo!( + "Construct new Rna from '{rna}' string. If string contains invalid nucleotides return index of first invalid nucleotide" + ); } } diff --git a/exercises/practice/robot-name/.meta/Cargo-example.toml b/exercises/practice/robot-name/.meta/Cargo-example.toml index 5713b6191..bceec03b5 100644 --- a/exercises/practice/robot-name/.meta/Cargo-example.toml +++ b/exercises/practice/robot-name/.meta/Cargo-example.toml @@ -1,7 +1,10 @@ [package] -edition = "2021" -name = "robot-name" -version = "0.0.0" +name = "robot_name" +version = "0.1.0" +edition = "2024" +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml [dependencies] rand = "0.3.12" diff --git a/exercises/practice/robot-name/Cargo.toml b/exercises/practice/robot-name/Cargo.toml index 1893bb13c..d584df2f0 100644 --- a/exercises/practice/robot-name/Cargo.toml +++ b/exercises/practice/robot-name/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" -name = "robot-name" -version = "0.0.0" +name = "robot_name" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [lints.clippy] new_without_default = "allow" diff --git a/exercises/practice/robot-simulator/Cargo.toml b/exercises/practice/robot-simulator/Cargo.toml index c82b015f6..996ffc36c 100644 --- a/exercises/practice/robot-simulator/Cargo.toml +++ b/exercises/practice/robot-simulator/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "robot-simulator" -version = "2.2.0" +name = "robot_simulator" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/roman-numerals/Cargo.toml b/exercises/practice/roman-numerals/Cargo.toml index e474f49cb..7d0f36fa7 100644 --- a/exercises/practice/roman-numerals/Cargo.toml +++ b/exercises/practice/roman-numerals/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "roman-numerals" -version = "1.0.0" +name = "roman_numerals" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/rotational-cipher/Cargo.toml b/exercises/practice/rotational-cipher/Cargo.toml index 2b00cbaeb..61e6d3c41 100644 --- a/exercises/practice/rotational-cipher/Cargo.toml +++ b/exercises/practice/rotational-cipher/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "rotational-cipher" -version = "1.0.0" +name = "rotational_cipher" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/run-length-encoding/Cargo.toml b/exercises/practice/run-length-encoding/Cargo.toml index ab5768d1f..838424e16 100644 --- a/exercises/practice/run-length-encoding/Cargo.toml +++ b/exercises/practice/run-length-encoding/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "run-length-encoding" -version = "1.1.0" +name = "run_length_encoding" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/saddle-points/Cargo.toml b/exercises/practice/saddle-points/Cargo.toml index 968176620..afe9ec54a 100644 --- a/exercises/practice/saddle-points/Cargo.toml +++ b/exercises/practice/saddle-points/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "saddle-points" -version = "1.3.0" +name = "saddle_points" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/say/Cargo.toml b/exercises/practice/say/Cargo.toml index 9338eb9cc..3a1bb171b 100644 --- a/exercises/practice/say/Cargo.toml +++ b/exercises/practice/say/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "say" -version = "1.2.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/scale-generator/Cargo.toml b/exercises/practice/scale-generator/Cargo.toml index 04a14757b..254b870d1 100644 --- a/exercises/practice/scale-generator/Cargo.toml +++ b/exercises/practice/scale-generator/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "scale_generator" -version = "2.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/scrabble-score/Cargo.toml b/exercises/practice/scrabble-score/Cargo.toml index 7de526ac3..eacff3dd8 100644 --- a/exercises/practice/scrabble-score/Cargo.toml +++ b/exercises/practice/scrabble-score/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "scrabble-score" -version = "1.1.0" +name = "scrabble_score" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/secret-handshake/Cargo.toml b/exercises/practice/secret-handshake/Cargo.toml index 029d1c91e..52f429426 100644 --- a/exercises/practice/secret-handshake/Cargo.toml +++ b/exercises/practice/secret-handshake/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "secret-handshake" -version = "1.1.0" +name = "secret_handshake" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/series/Cargo.toml b/exercises/practice/series/Cargo.toml index 6366609a3..a7aca7910 100644 --- a/exercises/practice/series/Cargo.toml +++ b/exercises/practice/series/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "series" version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/sieve/Cargo.toml b/exercises/practice/sieve/Cargo.toml index 7c35c45e1..bb52d8f89 100644 --- a/exercises/practice/sieve/Cargo.toml +++ b/exercises/practice/sieve/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "sieve" -version = "1.1.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/simple-cipher/Cargo.toml b/exercises/practice/simple-cipher/Cargo.toml index 5a2dcf498..bae81d0de 100644 --- a/exercises/practice/simple-cipher/Cargo.toml +++ b/exercises/practice/simple-cipher/Cargo.toml @@ -1,7 +1,10 @@ [package] -edition = "2021" -name = "simple-cipher" -version = "0.0.0" +name = "simple_cipher" +version = "0.1.0" +edition = "2024" +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml [dependencies] rand = "0.8" diff --git a/exercises/practice/simple-linked-list/Cargo.toml b/exercises/practice/simple-linked-list/Cargo.toml index 211831446..56df69ec3 100644 --- a/exercises/practice/simple-linked-list/Cargo.toml +++ b/exercises/practice/simple-linked-list/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" name = "simple_linked_list" version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [lints.clippy] new_without_default = "allow" diff --git a/exercises/practice/space-age/Cargo.toml b/exercises/practice/space-age/Cargo.toml index 9640244bd..bbe6044c7 100644 --- a/exercises/practice/space-age/Cargo.toml +++ b/exercises/practice/space-age/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "space-age" -version = "1.2.0" +name = "space_age" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/spiral-matrix/Cargo.toml b/exercises/practice/spiral-matrix/Cargo.toml index f86f78135..49fc6c78a 100644 --- a/exercises/practice/spiral-matrix/Cargo.toml +++ b/exercises/practice/spiral-matrix/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "spiral-matrix" -version = "1.1.0" +name = "spiral_matrix" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/sublist/Cargo.toml b/exercises/practice/sublist/Cargo.toml index 6493981cf..c900a2e79 100644 --- a/exercises/practice/sublist/Cargo.toml +++ b/exercises/practice/sublist/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "sublist" -version = "0.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/sublist/src/lib.rs b/exercises/practice/sublist/src/lib.rs index a83342a2c..ac50a59cf 100644 --- a/exercises/practice/sublist/src/lib.rs +++ b/exercises/practice/sublist/src/lib.rs @@ -7,5 +7,7 @@ pub enum Comparison { } pub fn sublist(first_list: &[i32], second_list: &[i32]) -> Comparison { - todo!("Determine if the {first_list:?} is equal to, sublist of, superlist of or unequal to {second_list:?}."); + todo!( + "Determine if the {first_list:?} is equal to, sublist of, superlist of or unequal to {second_list:?}." + ); } diff --git a/exercises/practice/sum-of-multiples/Cargo.toml b/exercises/practice/sum-of-multiples/Cargo.toml index c87994430..be310bd03 100644 --- a/exercises/practice/sum-of-multiples/Cargo.toml +++ b/exercises/practice/sum-of-multiples/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "sum-of-multiples" -version = "1.5.0" +name = "sum_of_multiples" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/tournament/Cargo.toml b/exercises/practice/tournament/Cargo.toml index e9209b33a..49744661b 100644 --- a/exercises/practice/tournament/Cargo.toml +++ b/exercises/practice/tournament/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "tournament" -version = "1.4.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/triangle/Cargo.toml b/exercises/practice/triangle/Cargo.toml index b7f441c75..9bb92a6ca 100644 --- a/exercises/practice/triangle/Cargo.toml +++ b/exercises/practice/triangle/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" name = "triangle" -version = "0.0.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [features] generic = [] diff --git a/exercises/practice/triangle/src/lib.rs b/exercises/practice/triangle/src/lib.rs index be8ce7a76..020b2a4cf 100644 --- a/exercises/practice/triangle/src/lib.rs +++ b/exercises/practice/triangle/src/lib.rs @@ -2,7 +2,9 @@ pub struct Triangle; impl Triangle { pub fn build(sides: [u64; 3]) -> Option { - todo!("Construct new Triangle from following sides: {sides:?}. Return None if the sides are invalid."); + todo!( + "Construct new Triangle from following sides: {sides:?}. Return None if the sides are invalid." + ); } pub fn is_equilateral(&self) -> bool { diff --git a/exercises/practice/two-bucket/Cargo.toml b/exercises/practice/two-bucket/Cargo.toml index 9f578e2aa..4feb06478 100644 --- a/exercises/practice/two-bucket/Cargo.toml +++ b/exercises/practice/two-bucket/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "two-bucket" -version = "1.4.0" +name = "two_bucket" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/two-bucket/tests/two-bucket.rs b/exercises/practice/two-bucket/tests/two-bucket.rs index bdf75162c..af845e9a4 100644 --- a/exercises/practice/two-bucket/tests/two-bucket.rs +++ b/exercises/practice/two-bucket/tests/two-bucket.rs @@ -61,8 +61,8 @@ fn measure_one_step_using_bucket_one_of_size_1_and_bucket_two_of_size_3_start_wi #[test] #[ignore] -fn measure_using_bucket_one_of_size_2_and_bucket_two_of_size_3_start_with_bucket_one_and_end_with_bucket_two( -) { +fn measure_using_bucket_one_of_size_2_and_bucket_two_of_size_3_start_with_bucket_one_and_end_with_bucket_two() + { let output = solve(2, 3, 3, &Bucket::One); let expected = Some(BucketStats { moves: 2, diff --git a/exercises/practice/two-fer/Cargo.toml b/exercises/practice/two-fer/Cargo.toml index e3345023e..31941433a 100644 --- a/exercises/practice/two-fer/Cargo.toml +++ b/exercises/practice/two-fer/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" name = "twofer" -version = "1.2.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/variable-length-quantity/Cargo.toml b/exercises/practice/variable-length-quantity/Cargo.toml index 6986c0c89..0b8caf3f8 100644 --- a/exercises/practice/variable-length-quantity/Cargo.toml +++ b/exercises/practice/variable-length-quantity/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "variable-length-quantity" -version = "1.2.0" +name = "variable_length_quantity" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/word-count/Cargo.toml b/exercises/practice/word-count/Cargo.toml index c2fab6f70..7ac73abec 100644 --- a/exercises/practice/word-count/Cargo.toml +++ b/exercises/practice/word-count/Cargo.toml @@ -1,4 +1,9 @@ [package] -edition = "2021" -name = "word-count" -version = "1.2.0" +name = "word_count" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/exercises/practice/wordy/Cargo.toml b/exercises/practice/wordy/Cargo.toml index 92e0bbcf2..aad29393a 100644 --- a/exercises/practice/wordy/Cargo.toml +++ b/exercises/practice/wordy/Cargo.toml @@ -1,7 +1,12 @@ [package] -edition = "2021" name = "wordy" -version = "1.5.0" +version = "0.1.0" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [features] exponentials = [] diff --git a/exercises/practice/xorcism/Cargo.toml b/exercises/practice/xorcism/Cargo.toml index ee70fa468..d1cacc9a7 100644 --- a/exercises/practice/xorcism/Cargo.toml +++ b/exercises/practice/xorcism/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "xorcism" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] [features] io = [] diff --git a/exercises/practice/yacht/Cargo.toml b/exercises/practice/yacht/Cargo.toml index 2c3813008..e28004466 100644 --- a/exercises/practice/yacht/Cargo.toml +++ b/exercises/practice/yacht/Cargo.toml @@ -1,4 +1,9 @@ [package] name = "yacht" version = "0.1.0" -edition = "2021" +edition = "2024" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] diff --git a/rust-tooling/generate/src/lib.rs b/rust-tooling/generate/src/lib.rs index 377678bbe..a80d7a1d0 100644 --- a/rust-tooling/generate/src/lib.rs +++ b/rust-tooling/generate/src/lib.rs @@ -48,13 +48,17 @@ Cargo.lock fn generate_manifest(crate_name: &str) -> String { format!( - concat!( - "[package]\n", - "edition = \"2021\"\n", - "name = \"{crate_name}\"\n", - "version = \"1.0.0\"\n", - ), - crate_name = crate_name + "\ +[package] +name = \"{crate_name}\" +version = \"0.1.0\" +edition = \"2024\" + +# Not all libraries from crates.io are available in Exercism's test runner. +# The full list of available libraries is here: +# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml +[dependencies] +" ) }