Rustlings Solution

Rustlings Solution

This is the collection of my solution & explanation for the rustlings exercises.

22.01.14: version: 4.6.0

If you are having hard time with rustlings, I suggest you to try The Book & Rust By Example first.

Tests are ordered in a way rustlings author recommended.

Exercises & Solution

You may also check my rustlings solution repo to see & run solution by yourself.

Variables

✅ Successfully ran exercises/variables/variables1.rs!
✅ Successfully ran exercises/variables/variables2.rs!
✅ Successfully ran exercises/variables/variables3.rs!
✅ Successfully ran exercises/variables/variables4.rs!
✅ Successfully ran exercises/variables/variables5.rs!
✅ Successfully ran exercises/variables/variables6.rs!

Continue with Rustlings Topic: Variables

Functions

✅ Successfully ran exercises/functions/functions1.rs!
✅ Successfully ran exercises/functions/functions2.rs!
✅ Successfully ran exercises/functions/functions3.rs!
✅ Successfully ran exercises/functions/functions4.rs!
✅ Successfully ran exercises/functions/functions5.rs!

Continue with Rustlings Topic: Functions

If

✅ Successfully tested exercises/if/if1.rs
✅ Successfully tested exercises/if/if2.rs

Continue with Rustlings Topic: If

Move Semantics

✅ Successfully ran exercises/move_semantics/move_semantics1.rs!
✅ Successfully ran exercises/move_semantics/move_semantics2.rs!
✅ Successfully ran exercises/move_semantics/move_semantics3.rs!
✅ Successfully ran exercises/move_semantics/move_semantics4.rs!
✅ Successfully ran exercises/move_semantics/move_semantics5.rs!

Continue with Rustlings Topic: Move Semantics

Primitive Types

✅ Successfully ran exercises/primitive_types/primitive_types1.rs!
✅ Successfully ran exercises/primitive_types/primitive_types2.rs!
✅ Successfully ran exercises/primitive_types/primitive_types3.rs!
✅ Successfully tested exercises/primitive_types/primitive_types4.rs
✅ Successfully ran exercises/primitive_types/primitive_types5.rs!
✅ Successfully tested exercises/primitive_types/primitive_types6.rs

Continue with Rustlings Topic: Primitive Types

Structures

✅ Successfully tested exercises/structs/structs1.rs
✅ Successfully tested exercises/structs/structs2.rs
✅ Successfully tested exercises/structs/structs3.rs

Continue with Rustlings Topic: Structures

Enums

✅ Successfully ran exercises/enums/enums1.rs!
✅ Successfully ran exercises/enums/enums2.rs!
✅ Successfully tested exercises/enums/enums3.rs

Continue with Rustlings Topic: Enums

Modules

✅ Successfully ran exercises/modules/modules1.rs!
✅ Successfully ran exercises/modules/modules2.rs!
✅ Successfully ran exercises/modules/modules3.rs!

Continue with Rustlings Topic: Modules

Collections

✅ Successfully tested exercises/collections/vec1.rs
✅ Successfully tested exercises/collections/vec2.rs
✅ Successfully tested exercises/collections/hashmap1.rs
✅ Successfully tested exercises/collections/hashmap2.rs

Continue with Rustlings Topic: Collections

Strings

✅ Successfully ran exercises/strings/strings1.rs!
✅ Successfully ran exercises/strings/strings2.rs!

Continue with Rustlings Topic: Strings

Error Handling

✅ Successfully tested exercises/error_handling/errors1.rs
✅ Successfully tested exercises/error_handling/errors2.rs
✅ Successfully ran exercises/error_handling/errors3.rs!
✅ Successfully tested exercises/error_handling/errors4.rs
✅ Successfully ran exercises/error_handling/errors5.rs!
✅ Successfully tested exercises/error_handling/errors6.rs

Continue with Rustlings Topic: Error Handling

Generics

✅ Successfully ran exercises/generics/generics1.rs!
✅ Successfully tested exercises/generics/generics2.rs
✅ Successfully tested exercises/generics/generics3.rs

Continue with Rustlings Topic: Generics

Option

✅ Successfully ran exercises/option/option1.rs!
✅ Successfully ran exercises/option/option2.rs!
✅ Successfully ran exercises/option/option3.rs!

Continue with Rustlings Topic: Option

Traits

✅ Successfully tested exercises/traits/traits1.rs
✅ Successfully tested exercises/traits/traits2.rs

Continue with Rustlings Topic: Traits

Tests

✅ Successfully tested exercises/tests/tests1.rs
✅ Successfully tested exercises/tests/tests2.rs
✅ Successfully tested exercises/tests/tests3.rs

Continue with Rustlings Topic: Tests

Standard Library Types

✅ Successfully tested exercises/standard_library_types/box1.rs
✅ Successfully ran exercises/standard_library_types/arc1.rs!
✅ Successfully ran exercises/standard_library_types/iterators1.rs!
✅ Successfully tested exercises/standard_library_types/iterators2.rs
✅ Successfully tested exercises/standard_library_types/iterators3.rs
✅ Successfully tested exercises/standard_library_types/iterators4.rs
✅ Successfully tested exercises/standard_library_types/iterators5.rs

Continue with Rustlings Topic: Standard Library Types

Threads

✅ Successfully ran exercises/threads/threads1.rs!

Continue with Rustlings Topic: Threads

Macro

✅ Successfully ran exercises/macros/macros1.rs!
✅ Successfully ran exercises/macros/macros2.rs!
✅ Successfully ran exercises/macros/macros3.rs!
✅ Successfully ran exercises/macros/macros4.rs!

Continue with Rustlings Topic: Macro

Clippy

✅ Successfully compiled exercises/clippy/clippy1.rs!
✅ Successfully compiled exercises/clippy/clippy2.rs!

Continue with Rustlings Topic: Clippy

Conversions

✅ Successfully tested exercises/conversions/using_as.rs
✅ Successfully tested exercises/conversions/from_into.rs
✅ Successfully tested exercises/conversions/from_str.rs
✅ Successfully tested exercises/conversions/try_from_into.rs
✅ Successfully tested exercises/conversions/as_ref_mut.rs

Continue with Rustlings Topic: Conversions

Advanced Errors

✅ Successfully tested exercises/advanced_errors/advanced_errs1.rs
✅ Successfully tested exercises/advanced_errors/advanced_errs2.rs

Continue with Rustlings Topic: Advanced Errors

Quiz

✅ Successfully tested exercises/quiz1.rs
✅ Successfully ran exercises/quiz2.rs!
✅ Successfully tested exercises/quiz3.rs
✅ Successfully tested exercises/quiz4.rs

Continue with Rustlings Topic: Quiz

Completed!

🎉 All exercises completed! 🎉

+----------------------------------------------------+
|          You made it to the Fe-nish line!          |
+----------------------------------------------------+

Happy Ferris

Congrats from the Ferris the Crab!