rustlings

solving rustlings ft. dracuxan
git clone [email protected]:dracuxan/rustlings.git
Log | Files | Refs

Cargo.toml (14591B)


      1 bin = [
      2   { name = "intro1", path = "exercises/00_intro/intro1.rs" },
      3   { name = "intro1_sol", path = "solutions/00_intro/intro1.rs" },
      4   { name = "intro2", path = "exercises/00_intro/intro2.rs" },
      5   { name = "intro2_sol", path = "solutions/00_intro/intro2.rs" },
      6   { name = "variables1", path = "exercises/01_variables/variables1.rs" },
      7   { name = "variables1_sol", path = "solutions/01_variables/variables1.rs" },
      8   { name = "variables2", path = "exercises/01_variables/variables2.rs" },
      9   { name = "variables2_sol", path = "solutions/01_variables/variables2.rs" },
     10   { name = "variables3", path = "exercises/01_variables/variables3.rs" },
     11   { name = "variables3_sol", path = "solutions/01_variables/variables3.rs" },
     12   { name = "variables4", path = "exercises/01_variables/variables4.rs" },
     13   { name = "variables4_sol", path = "solutions/01_variables/variables4.rs" },
     14   { name = "variables5", path = "exercises/01_variables/variables5.rs" },
     15   { name = "variables5_sol", path = "solutions/01_variables/variables5.rs" },
     16   { name = "variables6", path = "exercises/01_variables/variables6.rs" },
     17   { name = "variables6_sol", path = "solutions/01_variables/variables6.rs" },
     18   { name = "functions1", path = "exercises/02_functions/functions1.rs" },
     19   { name = "functions1_sol", path = "solutions/02_functions/functions1.rs" },
     20   { name = "functions2", path = "exercises/02_functions/functions2.rs" },
     21   { name = "functions2_sol", path = "solutions/02_functions/functions2.rs" },
     22   { name = "functions3", path = "exercises/02_functions/functions3.rs" },
     23   { name = "functions3_sol", path = "solutions/02_functions/functions3.rs" },
     24   { name = "functions4", path = "exercises/02_functions/functions4.rs" },
     25   { name = "functions4_sol", path = "solutions/02_functions/functions4.rs" },
     26   { name = "functions5", path = "exercises/02_functions/functions5.rs" },
     27   { name = "functions5_sol", path = "solutions/02_functions/functions5.rs" },
     28   { name = "if1", path = "exercises/03_if/if1.rs" },
     29   { name = "if1_sol", path = "solutions/03_if/if1.rs" },
     30   { name = "if2", path = "exercises/03_if/if2.rs" },
     31   { name = "if2_sol", path = "solutions/03_if/if2.rs" },
     32   { name = "if3", path = "exercises/03_if/if3.rs" },
     33   { name = "if3_sol", path = "solutions/03_if/if3.rs" },
     34   { name = "quiz1", path = "exercises/quizzes/quiz1.rs" },
     35   { name = "quiz1_sol", path = "solutions/quizzes/quiz1.rs" },
     36   { name = "primitive_types1", path = "exercises/04_primitive_types/primitive_types1.rs" },
     37   { name = "primitive_types1_sol", path = "solutions/04_primitive_types/primitive_types1.rs" },
     38   { name = "primitive_types2", path = "exercises/04_primitive_types/primitive_types2.rs" },
     39   { name = "primitive_types2_sol", path = "solutions/04_primitive_types/primitive_types2.rs" },
     40   { name = "primitive_types3", path = "exercises/04_primitive_types/primitive_types3.rs" },
     41   { name = "primitive_types3_sol", path = "solutions/04_primitive_types/primitive_types3.rs" },
     42   { name = "primitive_types4", path = "exercises/04_primitive_types/primitive_types4.rs" },
     43   { name = "primitive_types4_sol", path = "solutions/04_primitive_types/primitive_types4.rs" },
     44   { name = "primitive_types5", path = "exercises/04_primitive_types/primitive_types5.rs" },
     45   { name = "primitive_types5_sol", path = "solutions/04_primitive_types/primitive_types5.rs" },
     46   { name = "primitive_types6", path = "exercises/04_primitive_types/primitive_types6.rs" },
     47   { name = "primitive_types6_sol", path = "solutions/04_primitive_types/primitive_types6.rs" },
     48   { name = "vecs1", path = "exercises/05_vecs/vecs1.rs" },
     49   { name = "vecs1_sol", path = "solutions/05_vecs/vecs1.rs" },
     50   { name = "vecs2", path = "exercises/05_vecs/vecs2.rs" },
     51   { name = "vecs2_sol", path = "solutions/05_vecs/vecs2.rs" },
     52   { name = "move_semantics1", path = "exercises/06_move_semantics/move_semantics1.rs" },
     53   { name = "move_semantics1_sol", path = "solutions/06_move_semantics/move_semantics1.rs" },
     54   { name = "move_semantics2", path = "exercises/06_move_semantics/move_semantics2.rs" },
     55   { name = "move_semantics2_sol", path = "solutions/06_move_semantics/move_semantics2.rs" },
     56   { name = "move_semantics3", path = "exercises/06_move_semantics/move_semantics3.rs" },
     57   { name = "move_semantics3_sol", path = "solutions/06_move_semantics/move_semantics3.rs" },
     58   { name = "move_semantics4", path = "exercises/06_move_semantics/move_semantics4.rs" },
     59   { name = "move_semantics4_sol", path = "solutions/06_move_semantics/move_semantics4.rs" },
     60   { name = "move_semantics5", path = "exercises/06_move_semantics/move_semantics5.rs" },
     61   { name = "move_semantics5_sol", path = "solutions/06_move_semantics/move_semantics5.rs" },
     62   { name = "structs1", path = "exercises/07_structs/structs1.rs" },
     63   { name = "structs1_sol", path = "solutions/07_structs/structs1.rs" },
     64   { name = "structs2", path = "exercises/07_structs/structs2.rs" },
     65   { name = "structs2_sol", path = "solutions/07_structs/structs2.rs" },
     66   { name = "structs3", path = "exercises/07_structs/structs3.rs" },
     67   { name = "structs3_sol", path = "solutions/07_structs/structs3.rs" },
     68   { name = "enums1", path = "exercises/08_enums/enums1.rs" },
     69   { name = "enums1_sol", path = "solutions/08_enums/enums1.rs" },
     70   { name = "enums2", path = "exercises/08_enums/enums2.rs" },
     71   { name = "enums2_sol", path = "solutions/08_enums/enums2.rs" },
     72   { name = "enums3", path = "exercises/08_enums/enums3.rs" },
     73   { name = "enums3_sol", path = "solutions/08_enums/enums3.rs" },
     74   { name = "strings1", path = "exercises/09_strings/strings1.rs" },
     75   { name = "strings1_sol", path = "solutions/09_strings/strings1.rs" },
     76   { name = "strings2", path = "exercises/09_strings/strings2.rs" },
     77   { name = "strings2_sol", path = "solutions/09_strings/strings2.rs" },
     78   { name = "strings3", path = "exercises/09_strings/strings3.rs" },
     79   { name = "strings3_sol", path = "solutions/09_strings/strings3.rs" },
     80   { name = "strings4", path = "exercises/09_strings/strings4.rs" },
     81   { name = "strings4_sol", path = "solutions/09_strings/strings4.rs" },
     82   { name = "modules1", path = "exercises/10_modules/modules1.rs" },
     83   { name = "modules1_sol", path = "solutions/10_modules/modules1.rs" },
     84   { name = "modules2", path = "exercises/10_modules/modules2.rs" },
     85   { name = "modules2_sol", path = "solutions/10_modules/modules2.rs" },
     86   { name = "modules3", path = "exercises/10_modules/modules3.rs" },
     87   { name = "modules3_sol", path = "solutions/10_modules/modules3.rs" },
     88   { name = "hashmaps1", path = "exercises/11_hashmaps/hashmaps1.rs" },
     89   { name = "hashmaps1_sol", path = "solutions/11_hashmaps/hashmaps1.rs" },
     90   { name = "hashmaps2", path = "exercises/11_hashmaps/hashmaps2.rs" },
     91   { name = "hashmaps2_sol", path = "solutions/11_hashmaps/hashmaps2.rs" },
     92   { name = "hashmaps3", path = "exercises/11_hashmaps/hashmaps3.rs" },
     93   { name = "hashmaps3_sol", path = "solutions/11_hashmaps/hashmaps3.rs" },
     94   { name = "quiz2", path = "exercises/quizzes/quiz2.rs" },
     95   { name = "quiz2_sol", path = "solutions/quizzes/quiz2.rs" },
     96   { name = "options1", path = "exercises/12_options/options1.rs" },
     97   { name = "options1_sol", path = "solutions/12_options/options1.rs" },
     98   { name = "options2", path = "exercises/12_options/options2.rs" },
     99   { name = "options2_sol", path = "solutions/12_options/options2.rs" },
    100   { name = "options3", path = "exercises/12_options/options3.rs" },
    101   { name = "options3_sol", path = "solutions/12_options/options3.rs" },
    102   { name = "errors1", path = "exercises/13_error_handling/errors1.rs" },
    103   { name = "errors1_sol", path = "solutions/13_error_handling/errors1.rs" },
    104   { name = "errors2", path = "exercises/13_error_handling/errors2.rs" },
    105   { name = "errors2_sol", path = "solutions/13_error_handling/errors2.rs" },
    106   { name = "errors3", path = "exercises/13_error_handling/errors3.rs" },
    107   { name = "errors3_sol", path = "solutions/13_error_handling/errors3.rs" },
    108   { name = "errors4", path = "exercises/13_error_handling/errors4.rs" },
    109   { name = "errors4_sol", path = "solutions/13_error_handling/errors4.rs" },
    110   { name = "errors5", path = "exercises/13_error_handling/errors5.rs" },
    111   { name = "errors5_sol", path = "solutions/13_error_handling/errors5.rs" },
    112   { name = "errors6", path = "exercises/13_error_handling/errors6.rs" },
    113   { name = "errors6_sol", path = "solutions/13_error_handling/errors6.rs" },
    114   { name = "generics1", path = "exercises/14_generics/generics1.rs" },
    115   { name = "generics1_sol", path = "solutions/14_generics/generics1.rs" },
    116   { name = "generics2", path = "exercises/14_generics/generics2.rs" },
    117   { name = "generics2_sol", path = "solutions/14_generics/generics2.rs" },
    118   { name = "traits1", path = "exercises/15_traits/traits1.rs" },
    119   { name = "traits1_sol", path = "solutions/15_traits/traits1.rs" },
    120   { name = "traits2", path = "exercises/15_traits/traits2.rs" },
    121   { name = "traits2_sol", path = "solutions/15_traits/traits2.rs" },
    122   { name = "traits3", path = "exercises/15_traits/traits3.rs" },
    123   { name = "traits3_sol", path = "solutions/15_traits/traits3.rs" },
    124   { name = "traits4", path = "exercises/15_traits/traits4.rs" },
    125   { name = "traits4_sol", path = "solutions/15_traits/traits4.rs" },
    126   { name = "traits5", path = "exercises/15_traits/traits5.rs" },
    127   { name = "traits5_sol", path = "solutions/15_traits/traits5.rs" },
    128   { name = "quiz3", path = "exercises/quizzes/quiz3.rs" },
    129   { name = "quiz3_sol", path = "solutions/quizzes/quiz3.rs" },
    130   { name = "lifetimes1", path = "exercises/16_lifetimes/lifetimes1.rs" },
    131   { name = "lifetimes1_sol", path = "solutions/16_lifetimes/lifetimes1.rs" },
    132   { name = "lifetimes2", path = "exercises/16_lifetimes/lifetimes2.rs" },
    133   { name = "lifetimes2_sol", path = "solutions/16_lifetimes/lifetimes2.rs" },
    134   { name = "lifetimes3", path = "exercises/16_lifetimes/lifetimes3.rs" },
    135   { name = "lifetimes3_sol", path = "solutions/16_lifetimes/lifetimes3.rs" },
    136   { name = "tests1", path = "exercises/17_tests/tests1.rs" },
    137   { name = "tests1_sol", path = "solutions/17_tests/tests1.rs" },
    138   { name = "tests2", path = "exercises/17_tests/tests2.rs" },
    139   { name = "tests2_sol", path = "solutions/17_tests/tests2.rs" },
    140   { name = "tests3", path = "exercises/17_tests/tests3.rs" },
    141   { name = "tests3_sol", path = "solutions/17_tests/tests3.rs" },
    142   { name = "iterators1", path = "exercises/18_iterators/iterators1.rs" },
    143   { name = "iterators1_sol", path = "solutions/18_iterators/iterators1.rs" },
    144   { name = "iterators2", path = "exercises/18_iterators/iterators2.rs" },
    145   { name = "iterators2_sol", path = "solutions/18_iterators/iterators2.rs" },
    146   { name = "iterators3", path = "exercises/18_iterators/iterators3.rs" },
    147   { name = "iterators3_sol", path = "solutions/18_iterators/iterators3.rs" },
    148   { name = "iterators4", path = "exercises/18_iterators/iterators4.rs" },
    149   { name = "iterators4_sol", path = "solutions/18_iterators/iterators4.rs" },
    150   { name = "iterators5", path = "exercises/18_iterators/iterators5.rs" },
    151   { name = "iterators5_sol", path = "solutions/18_iterators/iterators5.rs" },
    152   { name = "box1", path = "exercises/19_smart_pointers/box1.rs" },
    153   { name = "box1_sol", path = "solutions/19_smart_pointers/box1.rs" },
    154   { name = "rc1", path = "exercises/19_smart_pointers/rc1.rs" },
    155   { name = "rc1_sol", path = "solutions/19_smart_pointers/rc1.rs" },
    156   { name = "arc1", path = "exercises/19_smart_pointers/arc1.rs" },
    157   { name = "arc1_sol", path = "solutions/19_smart_pointers/arc1.rs" },
    158   { name = "cow1", path = "exercises/19_smart_pointers/cow1.rs" },
    159   { name = "cow1_sol", path = "solutions/19_smart_pointers/cow1.rs" },
    160   { name = "threads1", path = "exercises/20_threads/threads1.rs" },
    161   { name = "threads1_sol", path = "solutions/20_threads/threads1.rs" },
    162   { name = "threads2", path = "exercises/20_threads/threads2.rs" },
    163   { name = "threads2_sol", path = "solutions/20_threads/threads2.rs" },
    164   { name = "threads3", path = "exercises/20_threads/threads3.rs" },
    165   { name = "threads3_sol", path = "solutions/20_threads/threads3.rs" },
    166   { name = "macros1", path = "exercises/21_macros/macros1.rs" },
    167   { name = "macros1_sol", path = "solutions/21_macros/macros1.rs" },
    168   { name = "macros2", path = "exercises/21_macros/macros2.rs" },
    169   { name = "macros2_sol", path = "solutions/21_macros/macros2.rs" },
    170   { name = "macros3", path = "exercises/21_macros/macros3.rs" },
    171   { name = "macros3_sol", path = "solutions/21_macros/macros3.rs" },
    172   { name = "macros4", path = "exercises/21_macros/macros4.rs" },
    173   { name = "macros4_sol", path = "solutions/21_macros/macros4.rs" },
    174   { name = "clippy1", path = "exercises/22_clippy/clippy1.rs" },
    175   { name = "clippy1_sol", path = "solutions/22_clippy/clippy1.rs" },
    176   { name = "clippy2", path = "exercises/22_clippy/clippy2.rs" },
    177   { name = "clippy2_sol", path = "solutions/22_clippy/clippy2.rs" },
    178   { name = "clippy3", path = "exercises/22_clippy/clippy3.rs" },
    179   { name = "clippy3_sol", path = "solutions/22_clippy/clippy3.rs" },
    180   { name = "using_as", path = "exercises/23_conversions/using_as.rs" },
    181   { name = "using_as_sol", path = "solutions/23_conversions/using_as.rs" },
    182   { name = "from_into", path = "exercises/23_conversions/from_into.rs" },
    183   { name = "from_into_sol", path = "solutions/23_conversions/from_into.rs" },
    184   { name = "from_str", path = "exercises/23_conversions/from_str.rs" },
    185   { name = "from_str_sol", path = "solutions/23_conversions/from_str.rs" },
    186   { name = "try_from_into", path = "exercises/23_conversions/try_from_into.rs" },
    187   { name = "try_from_into_sol", path = "solutions/23_conversions/try_from_into.rs" },
    188   { name = "as_ref_mut", path = "exercises/23_conversions/as_ref_mut.rs" },
    189   { name = "as_ref_mut_sol", path = "solutions/23_conversions/as_ref_mut.rs" },
    190 ]
    191 
    192 [package]
    193 name = "exercises"
    194 edition = "2024"
    195 # Don't publish the exercises on crates.io!
    196 publish = false
    197 
    198 [profile.release]
    199 panic = "abort"
    200 
    201 [profile.dev]
    202 panic = "abort"
    203 
    204 [lints.rust]
    205 # You shouldn't write unsafe code in Rustlings!
    206 unsafe_code = "forbid"
    207 # You don't need unstable features in Rustlings and shouldn't rely on them while learning Rust.
    208 unstable_features = "forbid"
    209 # Dead code warnings can't be avoided in some exercises and might distract while learning.
    210 dead_code = "allow"
    211 
    212 [lints.clippy]
    213 # You forgot a `todo!()`!
    214 todo = "forbid"
    215 # This can only happen by mistake in Rustlings.
    216 empty_loop = "forbid"
    217 # No infinite loops are needed in Rustlings.
    218 infinite_loop = "deny"
    219 # You shouldn't leak memory while still learning Rust!
    220 mem_forget = "deny"
    221 # Currently, there are no disallowed methods. This line avoids problems when developing Rustlings.
    222 disallowed_methods = "allow"