From ba1700299418eee0ce7bae51c3187fc29f65298c Mon Sep 17 00:00:00 2001 From: Adam <24621027+WhiteDopeOnPunk@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:52:52 -0500 Subject: [PATCH] ye --- clippy/Cargo.lock | 7 + clippy/Cargo.toml | 7 + clippy/README.md | 10 + clippy/clippy1.rs | 24 ++ clippy/clippy2.rs | 13 + clippy/clippy3.rs | 24 ++ clippy/target/.rustc_info.json | 1 + clippy/target/CACHEDIR.TAG | 3 + clippy/target/debug/.cargo-lock | 0 .../clippy3-ffc27d43dbc4dd6f/bin-clippy3 | 1 + .../clippy3-ffc27d43dbc4dd6f/bin-clippy3.json | 1 + .../clippy3-ffc27d43dbc4dd6f/dep-bin-clippy3 | Bin 0 -> 179 bytes .../invoked.timestamp | 1 + .../debug/deps/clippy3-ffc27d43dbc4dd6f.d | 9 + .../deps/libclippy3-ffc27d43dbc4dd6f.rmeta | 0 .../dep-graph.bin | Bin 0 -> 123151 bytes .../query-cache.bin | Bin 0 -> 18227 bytes .../work-products.bin | Bin 0 -> 45 bytes .../s-grpjdk4s8y-134gur1.lock | 0 conversions/README.md | 23 ++ conversions/as_ref_mut.rs | 63 +++++ conversions/from_into.rs | 153 ++++++++++++ conversions/from_str.rs | 147 ++++++++++++ conversions/try_from_into.rs | 226 ++++++++++++++++++ conversions/using_as.rs | 31 +++ enums/README.md | 10 + enums/enums1.rs | 18 ++ enums/enums2.rs | 31 +++ enums/enums3.rs | 81 +++++++ error_handling/README.md | 12 + error_handling/errors1.rs | 40 ++++ error_handling/errors2.rs | 48 ++++ error_handling/errors3.rs | 33 +++ error_handling/errors4.rs | 35 +++ error_handling/errors5.rs | 69 ++++++ error_handling/errors6.rs | 93 +++++++ functions/README.md | 8 + functions/functions1.rs | 10 + functions/functions2.rs | 14 ++ functions/functions3.rs | 14 ++ functions/functions4.rs | 26 ++ functions/functions5.rs | 13 + generics/README.md | 11 + generics/generics1.rs | 12 + generics/generics2.rs | 32 +++ hashmaps/README.md | 12 + hashmaps/hashmaps1.rs | 44 ++++ hashmaps/hashmaps2.rs | 94 ++++++++ hashmaps/hashmaps3.rs | 106 ++++++++ if/README.md | 7 + if/if1.rs | 32 +++ if/if2.rs | 37 +++ if/if3.rs | 54 +++++ intro/README.md | 8 + intro/intro1.rs | 40 ++++ intro/intro2.rs | 12 + iterators/README.md | 8 + iterators/iterators1.rs | 23 ++ iterators/iterators2.rs | 61 +++++ iterators/iterators3.rs | 101 ++++++++ iterators/iterators4.rs | 42 ++++ iterators/iterators5.rs | 156 ++++++++++++ lifetimes/README.md | 22 ++ lifetimes/lifetimes1.rs | 25 ++ lifetimes/lifetimes2.rs | 25 ++ lifetimes/lifetimes3.rs | 19 ++ macros/README.md | 14 ++ macros/macros1.rs | 14 ++ macros/macros2.rs | 14 ++ macros/macros3.rs | 19 ++ macros/macros4.rs | 19 ++ modules/README.md | 7 + modules/modules1.rs | 20 ++ modules/modules2.rs | 32 +++ modules/modules3.rs | 19 ++ move_semantics/README.md | 10 + move_semantics/move_semantics1.rs | 21 ++ move_semantics/move_semantics2.rs | 24 ++ move_semantics/move_semantics3.rs | 22 ++ move_semantics/move_semantics4.rs | 25 ++ move_semantics/move_semantics5.rs | 17 ++ move_semantics/move_semantics6.rs | 26 ++ options/README.md | 21 ++ options/options1.rs | 44 ++++ options/options2.rs | 40 ++++ options/options3.rs | 19 ++ primitive_types/README.md | 9 + primitive_types/primitive_types1.rs | 18 ++ primitive_types/primitive_types2.rs | 31 +++ primitive_types/primitive_types3.rs | 17 ++ primitive_types/primitive_types4.rs | 15 ++ primitive_types/primitive_types5.rs | 13 + primitive_types/primitive_types6.rs | 17 ++ quiz1.rs | 38 +++ quiz2.rs | 70 ++++++ quiz3.rs | 64 +++++ smart_pointers/README.md | 12 + smart_pointers/arc1.rs | 43 ++++ smart_pointers/box1.rs | 56 +++++ smart_pointers/cow1.rs | 79 ++++++ smart_pointers/rc1.rs | 103 ++++++++ strings/README.md | 9 + strings/strings1.rs | 15 ++ strings/strings2.rs | 20 ++ strings/strings3.rs | 43 ++++ strings/strings4.rs | 28 +++ structs/README.md | 8 + structs/structs1.rs | 52 ++++ structs/structs2.rs | 52 ++++ structs/structs3.rs | 91 +++++++ tests/README.md | 7 + tests/tests1.rs | 19 ++ tests/tests2.rs | 15 ++ tests/tests3.rs | 27 +++ tests/tests4.rs | 48 ++++ threads/README.md | 9 + threads/threads1.rs | 38 +++ threads/threads2.rs | 37 +++ threads/threads3.rs | 66 +++++ traits/README.md | 19 ++ traits/traits1.rs | 43 ++++ traits/traits2.rs | 33 +++ traits/traits3.rs | 42 ++++ traits/traits4.rs | 47 ++++ traits/traits5.rs | 38 +++ variables/README.md | 9 + variables/variables1.rs | 12 + variables/variables2.rs | 14 ++ variables/variables3.rs | 10 + variables/variables4.rs | 11 + variables/variables5.rs | 11 + variables/variables6.rs | 9 + vecs/README.md | 17 ++ vecs/vecs1.rs | 26 ++ vecs/vecs2.rs | 42 ++++ 135 files changed, 4261 insertions(+) create mode 100644 clippy/Cargo.lock create mode 100644 clippy/Cargo.toml create mode 100644 clippy/README.md create mode 100644 clippy/clippy1.rs create mode 100644 clippy/clippy2.rs create mode 100644 clippy/clippy3.rs create mode 100644 clippy/target/.rustc_info.json create mode 100644 clippy/target/CACHEDIR.TAG create mode 100644 clippy/target/debug/.cargo-lock create mode 100644 clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/bin-clippy3 create mode 100644 clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/bin-clippy3.json create mode 100644 clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/dep-bin-clippy3 create mode 100644 clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/invoked.timestamp create mode 100644 clippy/target/debug/deps/clippy3-ffc27d43dbc4dd6f.d create mode 100644 clippy/target/debug/deps/libclippy3-ffc27d43dbc4dd6f.rmeta create mode 100644 clippy/target/debug/incremental/clippy3-30o43d0kloptb/s-grpjdk4s8y-134gur1-catz0nwinlqwtldfhy5u24dt0/dep-graph.bin create mode 100644 clippy/target/debug/incremental/clippy3-30o43d0kloptb/s-grpjdk4s8y-134gur1-catz0nwinlqwtldfhy5u24dt0/query-cache.bin create mode 100644 clippy/target/debug/incremental/clippy3-30o43d0kloptb/s-grpjdk4s8y-134gur1-catz0nwinlqwtldfhy5u24dt0/work-products.bin create mode 100644 clippy/target/debug/incremental/clippy3-30o43d0kloptb/s-grpjdk4s8y-134gur1.lock create mode 100644 conversions/README.md create mode 100644 conversions/as_ref_mut.rs create mode 100644 conversions/from_into.rs create mode 100644 conversions/from_str.rs create mode 100644 conversions/try_from_into.rs create mode 100644 conversions/using_as.rs create mode 100644 enums/README.md create mode 100644 enums/enums1.rs create mode 100644 enums/enums2.rs create mode 100644 enums/enums3.rs create mode 100644 error_handling/README.md create mode 100644 error_handling/errors1.rs create mode 100644 error_handling/errors2.rs create mode 100644 error_handling/errors3.rs create mode 100644 error_handling/errors4.rs create mode 100644 error_handling/errors5.rs create mode 100644 error_handling/errors6.rs create mode 100644 functions/README.md create mode 100644 functions/functions1.rs create mode 100644 functions/functions2.rs create mode 100644 functions/functions3.rs create mode 100644 functions/functions4.rs create mode 100644 functions/functions5.rs create mode 100644 generics/README.md create mode 100644 generics/generics1.rs create mode 100644 generics/generics2.rs create mode 100644 hashmaps/README.md create mode 100644 hashmaps/hashmaps1.rs create mode 100644 hashmaps/hashmaps2.rs create mode 100644 hashmaps/hashmaps3.rs create mode 100644 if/README.md create mode 100644 if/if1.rs create mode 100644 if/if2.rs create mode 100644 if/if3.rs create mode 100644 intro/README.md create mode 100644 intro/intro1.rs create mode 100644 intro/intro2.rs create mode 100644 iterators/README.md create mode 100644 iterators/iterators1.rs create mode 100644 iterators/iterators2.rs create mode 100644 iterators/iterators3.rs create mode 100644 iterators/iterators4.rs create mode 100644 iterators/iterators5.rs create mode 100644 lifetimes/README.md create mode 100644 lifetimes/lifetimes1.rs create mode 100644 lifetimes/lifetimes2.rs create mode 100644 lifetimes/lifetimes3.rs create mode 100644 macros/README.md create mode 100644 macros/macros1.rs create mode 100644 macros/macros2.rs create mode 100644 macros/macros3.rs create mode 100644 macros/macros4.rs create mode 100644 modules/README.md create mode 100644 modules/modules1.rs create mode 100644 modules/modules2.rs create mode 100644 modules/modules3.rs create mode 100644 move_semantics/README.md create mode 100644 move_semantics/move_semantics1.rs create mode 100644 move_semantics/move_semantics2.rs create mode 100644 move_semantics/move_semantics3.rs create mode 100644 move_semantics/move_semantics4.rs create mode 100644 move_semantics/move_semantics5.rs create mode 100644 move_semantics/move_semantics6.rs create mode 100644 options/README.md create mode 100644 options/options1.rs create mode 100644 options/options2.rs create mode 100644 options/options3.rs create mode 100644 primitive_types/README.md create mode 100644 primitive_types/primitive_types1.rs create mode 100644 primitive_types/primitive_types2.rs create mode 100644 primitive_types/primitive_types3.rs create mode 100644 primitive_types/primitive_types4.rs create mode 100644 primitive_types/primitive_types5.rs create mode 100644 primitive_types/primitive_types6.rs create mode 100644 quiz1.rs create mode 100644 quiz2.rs create mode 100644 quiz3.rs create mode 100644 smart_pointers/README.md create mode 100644 smart_pointers/arc1.rs create mode 100644 smart_pointers/box1.rs create mode 100644 smart_pointers/cow1.rs create mode 100644 smart_pointers/rc1.rs create mode 100644 strings/README.md create mode 100644 strings/strings1.rs create mode 100644 strings/strings2.rs create mode 100644 strings/strings3.rs create mode 100644 strings/strings4.rs create mode 100644 structs/README.md create mode 100644 structs/structs1.rs create mode 100644 structs/structs2.rs create mode 100644 structs/structs3.rs create mode 100644 tests/README.md create mode 100644 tests/tests1.rs create mode 100644 tests/tests2.rs create mode 100644 tests/tests3.rs create mode 100644 tests/tests4.rs create mode 100644 threads/README.md create mode 100644 threads/threads1.rs create mode 100644 threads/threads2.rs create mode 100644 threads/threads3.rs create mode 100644 traits/README.md create mode 100644 traits/traits1.rs create mode 100644 traits/traits2.rs create mode 100644 traits/traits3.rs create mode 100644 traits/traits4.rs create mode 100644 traits/traits5.rs create mode 100644 variables/README.md create mode 100644 variables/variables1.rs create mode 100644 variables/variables2.rs create mode 100644 variables/variables3.rs create mode 100644 variables/variables4.rs create mode 100644 variables/variables5.rs create mode 100644 variables/variables6.rs create mode 100644 vecs/README.md create mode 100644 vecs/vecs1.rs create mode 100644 vecs/vecs2.rs diff --git a/clippy/Cargo.lock b/clippy/Cargo.lock new file mode 100644 index 0000000..d0fc406 --- /dev/null +++ b/clippy/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "clippy3" +version = "0.0.1" diff --git a/clippy/Cargo.toml b/clippy/Cargo.toml new file mode 100644 index 0000000..44dc91f --- /dev/null +++ b/clippy/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "clippy3" +version = "0.0.1" +edition = "2021" +[[bin]] +name = "clippy3" +path = "clippy3.rs" \ No newline at end of file diff --git a/clippy/README.md b/clippy/README.md new file mode 100644 index 0000000..55438af --- /dev/null +++ b/clippy/README.md @@ -0,0 +1,10 @@ +# Clippy + +The Clippy tool is a collection of lints to analyze your code so you can catch common mistakes and improve your Rust code. + +If you used the installation script for Rustlings, Clippy should be already installed. +If not you can install it manually via `rustup component add clippy`. + +## Further information + +- [GitHub Repository](https://github.com/rust-lang/rust-clippy). diff --git a/clippy/clippy1.rs b/clippy/clippy1.rs new file mode 100644 index 0000000..d9869c7 --- /dev/null +++ b/clippy/clippy1.rs @@ -0,0 +1,24 @@ +// clippy1.rs +// +// The Clippy tool is a collection of lints to analyze your code so you can +// catch common mistakes and improve your Rust code. +// +// For these exercises the code will fail to compile when there are clippy +// warnings check clippy's suggestions from the output to solve the exercise. +// +// Execute `rustlings hint clippy1` or use the `hint` watch subcommand for a +// hint. + +use std::f32; + +fn main() { + let pi = std::f32::consts::PI; + let radius = 5.00f32; + + let area = pi * f32::powi(radius, 2); + + println!( + "The area of a circle with radius {:.2} is {:.5}!", + radius, area + ) +} diff --git a/clippy/clippy2.rs b/clippy/clippy2.rs new file mode 100644 index 0000000..79c5c9f --- /dev/null +++ b/clippy/clippy2.rs @@ -0,0 +1,13 @@ +// clippy2.rs +// +// Execute `rustlings hint clippy2` or use the `hint` watch subcommand for a +// hint. + +fn main() { + let mut res = 42; + let option = Some(12); + if let Some(x) = option { + res += x; + } + println!("{}", res); +} diff --git a/clippy/clippy3.rs b/clippy/clippy3.rs new file mode 100644 index 0000000..2ddb705 --- /dev/null +++ b/clippy/clippy3.rs @@ -0,0 +1,24 @@ +// clippy3.rs +// +// Here's a couple more easy Clippy fixes, so you can see its utility. +// No hints. + +#[allow(unused_variables, unused_assignments)] +fn main() { + let my_option: Option<()> = None; + + let my_arr = &[ + -1, -2, -3, + -4, -5, -6, + ]; + println!("My array! Here it is: {:?}", my_arr); + + //let my_empty_vec = vec![1, 2, 3, 4, 5].resize(0, 5); + //println!("This Vec is empty, see? {:?}", my_empty_vec); + + let mut value_a = 45; + let mut value_b = 66; + // Let's swap these two! + std::mem::swap(&mut value_a, &mut value_b); + println!("value a: {}; value b: {}", value_a, value_b); +} diff --git a/clippy/target/.rustc_info.json b/clippy/target/.rustc_info.json new file mode 100644 index 0000000..5ef30be --- /dev/null +++ b/clippy/target/.rustc_info.json @@ -0,0 +1 @@ +{"rustc_fingerprint":12824587143487430529,"outputs":{"18303909016113816085":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/adam/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\nfeature=\"cargo-clippy\"\noverflow_checks\npanic=\"unwind\"\nproc_macro\nrelocation_model=\"pic\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.76.0-nightly (f704f3b93 2023-12-19)\nbinary: rustc\ncommit-hash: f704f3b93b1543cf504ecca0052f9f8531b1f61f\ncommit-date: 2023-12-19\nhost: x86_64-unknown-linux-gnu\nrelease: 1.76.0-nightly\nLLVM version: 17.0.6\n","stderr":""}},"successes":{}} \ No newline at end of file diff --git a/clippy/target/CACHEDIR.TAG b/clippy/target/CACHEDIR.TAG new file mode 100644 index 0000000..20d7c31 --- /dev/null +++ b/clippy/target/CACHEDIR.TAG @@ -0,0 +1,3 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by cargo. +# For information about cache directory tags see https://bford.info/cachedir/ diff --git a/clippy/target/debug/.cargo-lock b/clippy/target/debug/.cargo-lock new file mode 100644 index 0000000..e69de29 diff --git a/clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/bin-clippy3 b/clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/bin-clippy3 new file mode 100644 index 0000000..914afed --- /dev/null +++ b/clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/bin-clippy3 @@ -0,0 +1 @@ +a65d8094a4f80f39 \ No newline at end of file diff --git a/clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/bin-clippy3.json b/clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/bin-clippy3.json new file mode 100644 index 0000000..3d586f8 --- /dev/null +++ b/clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/bin-clippy3.json @@ -0,0 +1 @@ +{"rustc":4208557171189394848,"features":"[]","declared_features":"","target":14064950887575378383,"profile":5601947868832436996,"path":2386747541556052359,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/dep-bin-clippy3"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/dep-bin-clippy3 b/clippy/target/debug/.fingerprint/clippy3-ffc27d43dbc4dd6f/dep-bin-clippy3 new file mode 100644 index 0000000000000000000000000000000000000000..6cc5167b77fc06055c496b59d280db0f791a7ad8 GIT binary patch literal 179 zcmZQ#00J%`PR_|JD5x~nD=G$aofC`F^Yu#db90!0lH5S-?Bf{_5E<_n0^{p?S5s!J2OB zXP4e}`R>;xeL9IjAfGtGu;VG8%JrzZ`=jF?{@si%bbTQhcCd7vAUY*_pX%`Sa0(<# zD2hjpRCV8xn87&+7Jb@z;^wWp4ShJHUb%aI%ut1lS=+q2=-nNz`)55emMa1>0VIulumPK@rHQY->8GnEdoG#A z`UP2g4h87g7Pz6|RbsAPz3l?Re3njHQ{@~0fg8d=Itf1WSh!MEw|)M)A(iT@dG-xe z72iTdQf;N)N&a?nD_-46awPHSQj5);_Jyyx%JEZFdQSYLQy7RR-J?ReK!M>ab*{eC z!Vbx#odlP2i@Md`-^Y#)=Uf(Kr#Th+A=SoUBdFdZBgA$k$Teb;97#MDig_7?R} zh0kUsjdMuRNuW+-zqgQc0hOLQ@Gxo7r%F#q=f0KHz7uWAT1sgD*4iXFlDIT{$>BZg zLrRu}P*s=h9VV(yg7aUV-g-3`L-Of~a!Z2>;VdKH{Y0!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B4UKGP$dZNQMjMm R*UisTU1GW|L>P7d{x6UJdhY-L literal 0 HcmV?d00001 diff --git a/clippy/target/debug/incremental/clippy3-30o43d0kloptb/s-grpjdk4s8y-134gur1-catz0nwinlqwtldfhy5u24dt0/query-cache.bin b/clippy/target/debug/incremental/clippy3-30o43d0kloptb/s-grpjdk4s8y-134gur1-catz0nwinlqwtldfhy5u24dt0/query-cache.bin new file mode 100644 index 0000000000000000000000000000000000000000..93b3b66e0c26c8cece089d99dc12cc1fd48d7015 GIT binary patch literal 18227 zcmcg!d0Z67wyy4;85nk1hLJ@?0N03m z711DxD2hsgJI07nxq5K{C%E8-ii!xYs>f59o^IZK|Gd7xeirW&-NVPh+tb^}!^_*ltA|@6;tp1fGfzyP zdqx@mVtwMg;tTNp?#X2LTjK_q!uvL}>&2YK>E97TjIb=|N5)84hAeAUm`fhzN^9*O zNV$oDzv?h5TY~}FW?UxAQ!88RDrPP1k&F>3clX52Kt`q~pm zP#Q9lhK!{l6J3bSWVYh2F%>~}Fncg!CW*9?LQpH>8x~38W(04AyGew>w?_|qPB<$0 zmNFd67{P}%^_xc3@U(<0EK)F)9K)C)Q{2yplaNJvBES}6zFfpeB;$uOGC@X24mCDy zJYTxk<>*^RSb*4p_=|#4*Wd;AZ_5jBBKfyb2{Yn~DZS76_=LI;Sx+E78GA9|NbhCN zNEttMT4Gdka@;gsGLrG5^=LtTT~+O-bsU4uWlTl9OPcJ5tr6)=u*R5p-b6wcf4$gP zOfY6zU>Ne_+K7zn0s{#iX@!wU?|y8CSodlnhW(^}hgXN?zCwREVS`x)Pae2tJj03g zuT~g|j2eQF)<}Fy1kz(9=Q%xA0y0OqofkUAPPZsLe<2|F>9^-!+x>ajMUgdMts2kLA{5>cdSXtjXP0o~%f*bez@M53gKv)>D}gZbPrkMYhe_uPD+eznA&~}$M9#ez|Bp$nD!Z5bT2H~8Glc04)CgMmhMkcovhk9ekO&aPT z4Yiks+DSugq#+wIhy-6Uyk6oVp|e(K7c4$B69Y+T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zRS(zng?t4-yLR|9#TY2?^p4%Q`l`2ISE$8f@3x z{odxNcUIJ6YP*FNzkVO=OAltOOjYK62Ui`W1?FSSN2FyuWy3*->EVnY`))t>3q7kd znlokF;>g^rVUx$5T^H+FFizPtfR&ewzP}dQq4=ZQ#p3!0&BwRg;6txse*59kZm^|O zqWh0ba;<79v(kDUvx(Wl)T#C`YpnM(o0&WYpL{bL)yuoSRAu|8TkrMHU=H}dQsw)v zvM%t?WRCflSf2E+vN+?vgE{Yi$KtC0U5k>SO!c{-o$AX$`_Jmj@H*?~!P(5Bfj3l} z2A;NjJF7z7Fbf%`&R#cr_w1vy)8-tRb9c^*ISb~loSQROfqt1QFP*EWnJa6Y%WO(z z6bJD?|Cpul%em%x6qdMm%|)<=-I-4(G?;Bu(`XSan)S^^u>LGuz@Q>!!sps*{|6=# B`R@P# literal 0 HcmV?d00001 diff --git a/clippy/target/debug/incremental/clippy3-30o43d0kloptb/s-grpjdk4s8y-134gur1-catz0nwinlqwtldfhy5u24dt0/work-products.bin b/clippy/target/debug/incremental/clippy3-30o43d0kloptb/s-grpjdk4s8y-134gur1-catz0nwinlqwtldfhy5u24dt0/work-products.bin new file mode 100644 index 0000000000000000000000000000000000000000..2b437ed73a4df5b2430d3e10aec94eae74ce79b7 GIT binary patch literal 45 zcmWFv_H<@oP&L#uH`6oF&C5*BD9Nc*&`2{kFiA5`vNTpOGB7gMH8j#SwA5q(0RIFE AlmGw# literal 0 HcmV?d00001 diff --git a/clippy/target/debug/incremental/clippy3-30o43d0kloptb/s-grpjdk4s8y-134gur1.lock b/clippy/target/debug/incremental/clippy3-30o43d0kloptb/s-grpjdk4s8y-134gur1.lock new file mode 100644 index 0000000..e69de29 diff --git a/conversions/README.md b/conversions/README.md new file mode 100644 index 0000000..619a78c --- /dev/null +++ b/conversions/README.md @@ -0,0 +1,23 @@ +# Type conversions + +Rust offers a multitude of ways to convert a value of a given type into another type. + +The simplest form of type conversion is a type cast expression. It is denoted with the binary operator `as`. For instance, `println!("{}", 1 + 1.0);` would not compile, since `1` is an integer while `1.0` is a float. However, `println!("{}", 1 as f32 + 1.0)` should compile. The exercise [`using_as`](using_as.rs) tries to cover this. + +Rust also offers traits that facilitate type conversions upon implementation. These traits can be found under the [`convert`](https://doc.rust-lang.org/std/convert/index.html) module. +The traits are the following: + +- `From` and `Into` covered in [`from_into`](from_into.rs) +- `TryFrom` and `TryInto` covered in [`try_from_into`](try_from_into.rs) +- `AsRef` and `AsMut` covered in [`as_ref_mut`](as_ref_mut.rs) + +Furthermore, the `std::str` module offers a trait called [`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) which helps with converting strings into target types via the `parse` method on strings. If properly implemented for a given type `Person`, then `let p: Person = "Mark,20".parse().unwrap()` should both compile and run without panicking. + +These should be the main ways ***within the standard library*** to convert data into your desired types. + +## Further information + +These are not directly covered in the book, but the standard library has a great documentation for it. + +- [conversions](https://doc.rust-lang.org/std/convert/index.html) +- [`FromStr` trait](https://doc.rust-lang.org/std/str/trait.FromStr.html) diff --git a/conversions/as_ref_mut.rs b/conversions/as_ref_mut.rs new file mode 100644 index 0000000..14588d2 --- /dev/null +++ b/conversions/as_ref_mut.rs @@ -0,0 +1,63 @@ +// as_ref_mut.rs +// +// AsRef and AsMut allow for cheap reference-to-reference conversions. Read more +// about them at https://doc.rust-lang.org/std/convert/trait.AsRef.html and +// https://doc.rust-lang.org/std/convert/trait.AsMut.html, respectively. +// +// Execute `rustlings hint as_ref_mut` or use the `hint` watch subcommand for a +// hint. + +// Obtain the number of bytes (not characters) in the given argument. +// TODO: Add the AsRef trait appropriately as a trait bound. +fn byte_counter>(arg: T) -> usize { + arg.as_ref().as_bytes().len() +} + +// Obtain the number of characters (not bytes) in the given argument. +// TODO: Add the AsRef trait appropriately as a trait bound. +fn char_counter>(arg: T) -> usize { + arg.as_ref().chars().count() +} + +// Squares a number using as_mut(). +// TODO: Add the appropriate trait bound. +fn num_sq>(arg: &mut T) { + // TODO: Implement the function body. + *arg.as_mut() *= *arg.as_mut() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn different_counts() { + let s = "CafĂ© au lait"; + assert_ne!(char_counter(s), byte_counter(s)); + } + + #[test] + fn same_counts() { + let s = "Cafe au lait"; + assert_eq!(char_counter(s), byte_counter(s)); + } + + #[test] + fn different_counts_using_string() { + let s = String::from("CafĂ© au lait"); + assert_ne!(char_counter(s.clone()), byte_counter(s)); + } + + #[test] + fn same_counts_using_string() { + let s = String::from("Cafe au lait"); + assert_eq!(char_counter(s.clone()), byte_counter(s)); + } + + #[test] + fn mut_box() { + let mut num: Box = Box::new(3); + num_sq(&mut num); + assert_eq!(*num, 9); + } +} diff --git a/conversions/from_into.rs b/conversions/from_into.rs new file mode 100644 index 0000000..64562c4 --- /dev/null +++ b/conversions/from_into.rs @@ -0,0 +1,153 @@ +// from_into.rs +// +// The From trait is used for value-to-value conversions. If From is implemented +// correctly for a type, the Into trait should work conversely. You can read +// more about it at https://doc.rust-lang.org/std/convert/trait.From.html +// +// Execute `rustlings hint from_into` or use the `hint` watch subcommand for a +// hint. + +#[derive(Debug)] +struct Person { + name: String, + age: usize, +} + +// We implement the Default trait to use it as a fallback +// when the provided string is not convertible into a Person object +impl Default for Person { + fn default() -> Person { + Person { + name: String::from("John"), + age: 30, + } + } +} + +// Your task is to complete this implementation in order for the line `let p = +// Person::from("Mark,20")` to compile Please note that you'll need to parse the +// age component into a `usize` with something like `"4".parse::()`. The +// outcome of this needs to be handled appropriately. +// +// Steps: +// 1. If the length of the provided string is 0, then return the default of +// Person. +// 2. Split the given string on the commas present in it. +// 3. Extract the first element from the split operation and use it as the name. +// 4. If the name is empty, then return the default of Person. +// 5. Extract the other element from the split operation and parse it into a +// `usize` as the age. +// If while parsing the age, something goes wrong, then return the default of +// Person Otherwise, then return an instantiated Person object with the results + +impl From<&str> for Person { + fn from(s: &str) -> Self { + let parts = s.split(',').collect::>(); + if parts.len() < 2 { + Person::default() + } else { + match parts[..2] { + [name, age] if !name.is_empty() => age + .parse() + .map(|age| Self { + name: name.to_string(), + age, + }) + .unwrap_or_default(), + _ => Self::default(), + } + } + } +} + +fn main() { + // Use the `from` function + let p1 = Person::from("Mark,20"); + // Since From is implemented for Person, we should be able to use Into + let p2: Person = "Gerald,70".into(); + println!("{:?}", p1); + println!("{:?}", p2); +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn test_default() { + // Test that the default person is 30 year old John + let dp = Person::default(); + assert_eq!(dp.name, "John"); + assert_eq!(dp.age, 30); + } + #[test] + fn test_bad_convert() { + // Test that John is returned when bad string is provided + let p = Person::from(""); + assert_eq!(p.name, "John"); + assert_eq!(p.age, 30); + } + #[test] + fn test_good_convert() { + // Test that "Mark,20" works + let p = Person::from("Mark,20"); + assert_eq!(p.name, "Mark"); + assert_eq!(p.age, 20); + } + #[test] + fn test_bad_age() { + // Test that "Mark,twenty" will return the default person due to an + // error in parsing age + let p = Person::from("Mark,twenty"); + assert_eq!(p.name, "John"); + assert_eq!(p.age, 30); + } + + #[test] + fn test_missing_comma_and_age() { + let p: Person = Person::from("Mark"); + assert_eq!(p.name, "John"); + assert_eq!(p.age, 30); + } + + #[test] + fn test_missing_age() { + let p: Person = Person::from("Mark,"); + assert_eq!(p.name, "John"); + assert_eq!(p.age, 30); + } + + #[test] + fn test_missing_name() { + let p: Person = Person::from(",1"); + assert_eq!(p.name, "John"); + assert_eq!(p.age, 30); + } + + #[test] + fn test_missing_name_and_age() { + let p: Person = Person::from(","); + assert_eq!(p.name, "John"); + assert_eq!(p.age, 30); + } + + #[test] + fn test_missing_name_and_invalid_age() { + let p: Person = Person::from(",one"); + assert_eq!(p.name, "John"); + assert_eq!(p.age, 30); + } + + #[test] + fn test_trailing_comma() { + let p: Person = Person::from("Mike,32,"); + assert_eq!(p.name, "Mike"); + assert_eq!(p.age, 32); + } + + #[test] + fn test_trailing_comma_and_some_string() { + let p: Person = Person::from("Mike,32,man"); + assert_eq!(p.name, "Mike"); + assert_eq!(p.age, 32); + } +} diff --git a/conversions/from_str.rs b/conversions/from_str.rs new file mode 100644 index 0000000..616e27a --- /dev/null +++ b/conversions/from_str.rs @@ -0,0 +1,147 @@ +// from_str.rs +// +// This is similar to from_into.rs, but this time we'll implement `FromStr` and +// return errors instead of falling back to a default value. Additionally, upon +// implementing FromStr, you can use the `parse` method on strings to generate +// an object of the implementor type. You can read more about it at +// https://doc.rust-lang.org/std/str/trait.FromStr.html +// +// Execute `rustlings hint from_str` or use the `hint` watch subcommand for a +// hint. + +use std::num::ParseIntError; +use std::str::FromStr; + +#[derive(Debug, PartialEq)] +struct Person { + name: String, + age: usize, +} + +// We will use this error type for the `FromStr` implementation. +#[derive(Debug, PartialEq)] +enum ParsePersonError { + // Empty input string + Empty, + // Incorrect number of fields + BadLen, + // Empty name field + NoName, + // Wrapped error from parse::() + ParseInt(ParseIntError), +} + +// Steps: +// 1. If the length of the provided string is 0, an error should be returned +// 2. Split the given string on the commas present in it +// 3. Only 2 elements should be returned from the split, otherwise return an +// error +// 4. Extract the first element from the split operation and use it as the name +// 5. Extract the other element from the split operation and parse it into a +// `usize` as the age with something like `"4".parse::()` +// 6. If while extracting the name and the age something goes wrong, an error +// should be returned +// If everything goes well, then return a Result of a Person object +// +// As an aside: `Box` implements `From<&'_ str>`. This means that if +// you want to return a string error message, you can do so via just using +// return `Err("my error message".into())`. + +impl FromStr for Person { + type Err = ParsePersonError; + fn from_str(s: &str) -> Result { + if s.len() == 0 { + Err(ParsePersonError::Empty) + } else { + let parts = s.split(',').collect::>(); + if parts.len() != 2 { + Err(ParsePersonError::BadLen) + } else if parts[0].len() == 0 { + Err(ParsePersonError::NoName) + } else { + let name = parts[0].to_string(); + let age = parts[1] + .parse::() + .map_err(ParsePersonError::ParseInt)?; + Ok(Person { name, age }) + } + } + } +} + +fn main() { + let p = "Mark,20".parse::().unwrap(); + println!("{:?}", p); +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn empty_input() { + assert_eq!("".parse::(), Err(ParsePersonError::Empty)); + } + #[test] + fn good_input() { + let p = "John,32".parse::(); + assert!(p.is_ok()); + let p = p.unwrap(); + assert_eq!(p.name, "John"); + assert_eq!(p.age, 32); + } + #[test] + fn missing_age() { + assert!(matches!( + "John,".parse::(), + Err(ParsePersonError::ParseInt(_)) + )); + } + + #[test] + fn invalid_age() { + assert!(matches!( + "John,twenty".parse::(), + Err(ParsePersonError::ParseInt(_)) + )); + } + + #[test] + fn missing_comma_and_age() { + assert_eq!("John".parse::(), Err(ParsePersonError::BadLen)); + } + + #[test] + fn missing_name() { + assert_eq!(",1".parse::(), Err(ParsePersonError::NoName)); + } + + #[test] + fn missing_name_and_age() { + assert!(matches!( + ",".parse::(), + Err(ParsePersonError::NoName | ParsePersonError::ParseInt(_)) + )); + } + + #[test] + fn missing_name_and_invalid_age() { + assert!(matches!( + ",one".parse::(), + Err(ParsePersonError::NoName | ParsePersonError::ParseInt(_)) + )); + } + + #[test] + fn trailing_comma() { + assert_eq!("John,32,".parse::(), Err(ParsePersonError::BadLen)); + } + + #[test] + fn trailing_comma_and_some_string() { + assert_eq!( + "John,32,man".parse::(), + Err(ParsePersonError::BadLen) + ); + } +} diff --git a/conversions/try_from_into.rs b/conversions/try_from_into.rs new file mode 100644 index 0000000..0ec3d52 --- /dev/null +++ b/conversions/try_from_into.rs @@ -0,0 +1,226 @@ +// try_from_into.rs +// +// TryFrom is a simple and safe type conversion that may fail in a controlled +// way under some circumstances. Basically, this is the same as From. The main +// difference is that this should return a Result type instead of the target +// type itself. You can read more about it at +// https://doc.rust-lang.org/std/convert/trait.TryFrom.html +// +// Execute `rustlings hint try_from_into` or use the `hint` watch subcommand for +// a hint. + +use std::convert::{TryFrom, TryInto}; + +#[derive(Debug, PartialEq)] +struct Color { + red: u8, + green: u8, + blue: u8, +} + +// We will use this error type for these `TryFrom` conversions. +#[derive(Debug, PartialEq)] +enum IntoColorError { + // Incorrect length of slice + BadLen, + // Integer conversion error + IntConversion, +} + +// Your task is to complete this implementation and return an Ok result of inner +// type Color. You need to create an implementation for a tuple of three +// integers, an array of three integers, and a slice of integers. +// +// Note that the implementation for tuple and array will be checked at compile +// time, but the slice implementation needs to check the slice length! Also note +// that correct RGB color values must be integers in the 0..=255 range. + +// Tuple implementation +impl TryFrom<(i16, i16, i16)> for Color { + type Error = IntoColorError; + fn try_from(tuple: (i16, i16, i16)) -> Result { + let (red, green, blue) = tuple; + + for color in [red, green, blue] { + if !(0..=255).contains(&color) { + return Err(IntoColorError::IntConversion); + } + } + Ok(Self { + red: tuple.0 as u8, + green: tuple.1 as u8, + blue: tuple.2 as u8, + }) + } +} + +// Array implementation +impl TryFrom<[i16; 3]> for Color { + type Error = IntoColorError; + fn try_from(arr: [i16; 3]) -> Result { + for color in arr { + if !(0..=255).contains(&color) { + return Err(IntoColorError::IntConversion); + } + } + Ok(Self { + red: arr[0] as u8, + green: arr[1] as u8, + blue: arr[2] as u8, + }) + } +} + +// Slice implementation +impl TryFrom<&[i16]> for Color { + type Error = IntoColorError; + fn try_from(slice: &[i16]) -> Result { + if slice.len() != 3 { + return Err(IntoColorError::BadLen); + } + for color in slice { + if !(0..=255).contains(color) { + return Err(IntoColorError::IntConversion); + } + } + Ok(Self { + red: slice[0] as u8, + green: slice[1] as u8, + blue: slice[2] as u8, + }) + } +} + +fn main() { + // Use the `try_from` function + let c1 = Color::try_from((183, 65, 14)); + println!("{:?}", c1); + + // Since TryFrom is implemented for Color, we should be able to use TryInto + let c2: Result = [183, 65, 14].try_into(); + println!("{:?}", c2); + + let v = vec![183, 65, 14]; + // With slice we should use `try_from` function + let c3 = Color::try_from(&v[..]); + println!("{:?}", c3); + // or take slice within round brackets and use TryInto + let c4: Result = (&v[..]).try_into(); + println!("{:?}", c4); +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_tuple_out_of_range_positive() { + assert_eq!( + Color::try_from((256, 1000, 10000)), + Err(IntoColorError::IntConversion) + ); + } + #[test] + fn test_tuple_out_of_range_negative() { + assert_eq!( + Color::try_from((-1, -10, -256)), + Err(IntoColorError::IntConversion) + ); + } + #[test] + fn test_tuple_sum() { + assert_eq!( + Color::try_from((-1, 255, 255)), + Err(IntoColorError::IntConversion) + ); + } + #[test] + fn test_tuple_correct() { + let c: Result = (183, 65, 14).try_into(); + assert!(c.is_ok()); + assert_eq!( + c.unwrap(), + Color { + red: 183, + green: 65, + blue: 14 + } + ); + } + #[test] + fn test_array_out_of_range_positive() { + let c: Result = [1000, 10000, 256].try_into(); + assert_eq!(c, Err(IntoColorError::IntConversion)); + } + #[test] + fn test_array_out_of_range_negative() { + let c: Result = [-10, -256, -1].try_into(); + assert_eq!(c, Err(IntoColorError::IntConversion)); + } + #[test] + fn test_array_sum() { + let c: Result = [-1, 255, 255].try_into(); + assert_eq!(c, Err(IntoColorError::IntConversion)); + } + #[test] + fn test_array_correct() { + let c: Result = [183, 65, 14].try_into(); + assert!(c.is_ok()); + assert_eq!( + c.unwrap(), + Color { + red: 183, + green: 65, + blue: 14 + } + ); + } + #[test] + fn test_slice_out_of_range_positive() { + let arr = [10000, 256, 1000]; + assert_eq!( + Color::try_from(&arr[..]), + Err(IntoColorError::IntConversion) + ); + } + #[test] + fn test_slice_out_of_range_negative() { + let arr = [-256, -1, -10]; + assert_eq!( + Color::try_from(&arr[..]), + Err(IntoColorError::IntConversion) + ); + } + #[test] + fn test_slice_sum() { + let arr = [-1, 255, 255]; + assert_eq!( + Color::try_from(&arr[..]), + Err(IntoColorError::IntConversion) + ); + } + #[test] + fn test_slice_correct() { + let v = vec![183, 65, 14]; + let c: Result = Color::try_from(&v[..]); + assert!(c.is_ok()); + assert_eq!( + c.unwrap(), + Color { + red: 183, + green: 65, + blue: 14 + } + ); + } + #[test] + fn test_slice_excess_length() { + let v = vec![0, 0, 0, 0]; + assert_eq!(Color::try_from(&v[..]), Err(IntoColorError::BadLen)); + } + #[test] + fn test_slice_insufficient_length() { + let v = vec![0, 0]; + assert_eq!(Color::try_from(&v[..]), Err(IntoColorError::BadLen)); + } +} diff --git a/conversions/using_as.rs b/conversions/using_as.rs new file mode 100644 index 0000000..a9f1e44 --- /dev/null +++ b/conversions/using_as.rs @@ -0,0 +1,31 @@ +// using_as.rs +// +// Type casting in Rust is done via the usage of the `as` operator. Please note +// that the `as` operator is not only used when type casting. It also helps with +// renaming imports. +// +// The goal is to make sure that the division does not fail to compile and +// returns the proper type. +// +// Execute `rustlings hint using_as` or use the `hint` watch subcommand for a +// hint. + +fn average(values: &[f64]) -> f64 { + let total = values.iter().sum::(); + total / values.len() as f64 +} + +fn main() { + let values = [3.5, 0.3, 13.0, 11.7]; + println!("{}", average(&values)); +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn returns_proper_type_and_value() { + assert_eq!(average(&[3.5, 0.3, 13.0, 11.7]), 7.125); + } +} diff --git a/enums/README.md b/enums/README.md new file mode 100644 index 0000000..30d4d91 --- /dev/null +++ b/enums/README.md @@ -0,0 +1,10 @@ +# Enums + +Rust allows you to define types called "enums" which enumerate possible values. +Enums are a feature in many languages, but their capabilities differ in each language. Rust’s enums are most similar to algebraic data types in functional languages, such as F#, OCaml, and Haskell. +Useful in combination with enums is Rust's "pattern matching" facility, which makes it easy to run different code for different values of an enumeration. + +## Further information + +- [Enums](https://doc.rust-lang.org/book/ch06-00-enums.html) +- [Pattern syntax](https://doc.rust-lang.org/book/ch18-03-pattern-syntax.html) diff --git a/enums/enums1.rs b/enums/enums1.rs new file mode 100644 index 0000000..046ddd9 --- /dev/null +++ b/enums/enums1.rs @@ -0,0 +1,18 @@ +// enums1.rs +// +// No hints this time! ;) + +#[derive(Debug)] +enum Message { + Quit, + Echo, + Move, + ChangeColor +} + +fn main() { + println!("{:?}", Message::Quit); + println!("{:?}", Message::Echo); + println!("{:?}", Message::Move); + println!("{:?}", Message::ChangeColor); +} diff --git a/enums/enums2.rs b/enums/enums2.rs new file mode 100644 index 0000000..a37f535 --- /dev/null +++ b/enums/enums2.rs @@ -0,0 +1,31 @@ +// enums2.rs +// +// Execute `rustlings hint enums2` or use the `hint` watch subcommand for a +// hint. + +#[derive(Debug)] +enum Message { + Move{x: u8, y: u8}, + Echo(String), + ChangeColor(u8, u8, u8), + Quit, +} + +impl Message { + fn call(&self) { + println!("{:?}", self); + } +} + +fn main() { + let messages = [ + Message::Move { x: 10, y: 30 }, + Message::Echo(String::from("hello world")), + Message::ChangeColor(200, 255, 255), + Message::Quit, + ]; + + for message in &messages { + message.call(); + } +} diff --git a/enums/enums3.rs b/enums/enums3.rs new file mode 100644 index 0000000..d91b45e --- /dev/null +++ b/enums/enums3.rs @@ -0,0 +1,81 @@ +// enums3.rs +// +// Address all the TODOs to make the tests pass! +// +// Execute `rustlings hint enums3` or use the `hint` watch subcommand for a +// hint. + +enum Message { + ChangeColor(u8, u8, u8), + Echo(String), + Move(Point), + Quit, +} + +struct Point { + x: u8, + y: u8, +} + +struct State { + color: (u8, u8, u8), + position: Point, + quit: bool, + message: String, +} + +impl State { + fn change_color(&mut self, color: (u8, u8, u8)) { + self.color = color; + } + + fn quit(&mut self) { + self.quit = true; + } + + fn echo(&mut self, s: String) { + self.message = s + } + + fn move_position(&mut self, p: Point) { + self.position = p; + } + + fn process(&mut self, message: Message) { + // TODO: create a match expression to process the different message + // variants + // Remember: When passing a tuple as a function argument, you'll need + // extra parentheses: fn function((t, u, p, l, e)) + match message { + Message::ChangeColor(r, g, b) => self.change_color((r, g, b)), + Message::Echo(echo) => self.echo(echo), + Message::Move(point) => self.move_position(point), + Message::Quit => self.quit() + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_match_message_call() { + let mut state = State { + quit: false, + position: Point { x: 0, y: 0 }, + color: (0, 0, 0), + message: "hello world".to_string(), + }; + state.process(Message::ChangeColor(255, 0, 255)); + state.process(Message::Echo(String::from("Hello world!"))); + state.process(Message::Move(Point { x: 10, y: 15 })); + state.process(Message::Quit); + + assert_eq!(state.color, (255, 0, 255)); + assert_eq!(state.position.x, 10); + assert_eq!(state.position.y, 15); + assert_eq!(state.quit, true); + assert_eq!(state.message, "Hello world!"); + } +} diff --git a/error_handling/README.md b/error_handling/README.md new file mode 100644 index 0000000..3b21f2b --- /dev/null +++ b/error_handling/README.md @@ -0,0 +1,12 @@ +# Error handling + +Most errors aren’t serious enough to require the program to stop entirely. +Sometimes, when a function fails, it’s for a reason that you can easily interpret and respond to. +For example, if you try to open a file and that operation fails because the file doesn’t exist, you might want to create the file instead of terminating the process. + +## Further information + +- [Error Handling](https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html) +- [Generics](https://doc.rust-lang.org/book/ch10-01-syntax.html) +- [Result](https://doc.rust-lang.org/rust-by-example/error/result.html) +- [Boxing errors](https://doc.rust-lang.org/rust-by-example/error/multiple_error_types/boxing_errors.html) diff --git a/error_handling/errors1.rs b/error_handling/errors1.rs new file mode 100644 index 0000000..f1e0874 --- /dev/null +++ b/error_handling/errors1.rs @@ -0,0 +1,40 @@ +// errors1.rs +// +// This function refuses to generate text to be printed on a nametag if you pass +// it an empty string. It'd be nicer if it explained what the problem was, +// instead of just sometimes returning `None`. Thankfully, Rust has a similar +// construct to `Option` that can be used to express error conditions. Let's use +// it! +// +// Execute `rustlings hint errors1` or use the `hint` watch subcommand for a +// hint. + +pub fn generate_nametag_text(name: String) -> Result { + if name.is_empty() { + Err("`name` was empty; it must be nonempty.".to_string()) + } else { + Ok(format!("Hi! My name is {}", name)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn generates_nametag_text_for_a_nonempty_name() { + assert_eq!( + generate_nametag_text("BeyoncĂ©".into()), + Ok("Hi! My name is BeyoncĂ©".into()) + ); + } + + #[test] + fn explains_why_generating_nametag_text_fails() { + assert_eq!( + generate_nametag_text("".into()), + // Don't change this line + Err("`name` was empty; it must be nonempty.".into()) + ); + } +} diff --git a/error_handling/errors2.rs b/error_handling/errors2.rs new file mode 100644 index 0000000..2768330 --- /dev/null +++ b/error_handling/errors2.rs @@ -0,0 +1,48 @@ +// errors2.rs +// +// Say we're writing a game where you can buy items with tokens. All items cost +// 5 tokens, and whenever you purchase items there is a processing fee of 1 +// token. A player of the game will type in how many items they want to buy, and +// the `total_cost` function will calculate the total cost of the tokens. Since +// the player typed in the quantity, though, we get it as a string-- and they +// might have typed anything, not just numbers! +// +// Right now, this function isn't handling the error case at all (and isn't +// handling the success case properly either). What we want to do is: if we call +// the `total_cost` function on a string that is not a number, that function +// will return a `ParseIntError`, and in that case, we want to immediately +// return that error from our function and not try to multiply and add. +// +// There are at least two ways to implement this that are both correct-- but one +// is a lot shorter! +// +// Execute `rustlings hint errors2` or use the `hint` watch subcommand for a +// hint. + +use std::num::ParseIntError; + +pub fn total_cost(item_quantity: &str) -> Result { + let processing_fee = 1; + let cost_per_item = 5; + let qty = item_quantity.parse::()?; + + Ok(qty * cost_per_item + processing_fee) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn item_quantity_is_a_valid_number() { + assert_eq!(total_cost("34"), Ok(171)); + } + + #[test] + fn item_quantity_is_an_invalid_number() { + assert_eq!( + total_cost("beep boop").unwrap_err().to_string(), + "invalid digit found in string" + ); + } +} diff --git a/error_handling/errors3.rs b/error_handling/errors3.rs new file mode 100644 index 0000000..8222ec4 --- /dev/null +++ b/error_handling/errors3.rs @@ -0,0 +1,33 @@ +// errors3.rs +// +// This is a program that is trying to use a completed version of the +// `total_cost` function from the previous exercise. It's not working though! +// Why not? What should we do to fix it? +// +// Execute `rustlings hint errors3` or use the `hint` watch subcommand for a +// hint. + +use std::num::ParseIntError; + +fn main() -> Result<(), ParseIntError> { + let mut tokens = 100; + let pretend_user_input = "8"; + + let cost = total_cost(pretend_user_input)?; + + if cost > tokens { + println!("You can't afford that many!"); + } else { + tokens -= cost; + println!("You now have {} tokens.", tokens); + } + Ok(()) +} + +pub fn total_cost(item_quantity: &str) -> Result { + let processing_fee = 1; + let cost_per_item = 5; + let qty = item_quantity.parse::()?; + + Ok(qty * cost_per_item + processing_fee) +} diff --git a/error_handling/errors4.rs b/error_handling/errors4.rs new file mode 100644 index 0000000..3dd4af1 --- /dev/null +++ b/error_handling/errors4.rs @@ -0,0 +1,35 @@ +// errors4.rs +// +// Execute `rustlings hint errors4` or use the `hint` watch subcommand for a +// hint. + +use std::cmp::Ordering; + +#[derive(PartialEq, Debug)] +struct PositiveNonzeroInteger(u64); + +#[derive(PartialEq, Debug)] +enum CreationError { + Negative, + Zero, +} + +impl PositiveNonzeroInteger { + fn new(value: i64) -> Result { + match value.cmp(&0) { + Ordering::Greater => Ok(PositiveNonzeroInteger(value as u64)), + Ordering::Equal => Err(CreationError::Zero), + Ordering::Less => Err(CreationError::Negative), + } + } +} + +#[test] +fn test_creation() { + assert!(PositiveNonzeroInteger::new(10).is_ok()); + assert_eq!( + Err(CreationError::Negative), + PositiveNonzeroInteger::new(-10) + ); + assert_eq!(Err(CreationError::Zero), PositiveNonzeroInteger::new(0)); +} diff --git a/error_handling/errors5.rs b/error_handling/errors5.rs new file mode 100644 index 0000000..797a60d --- /dev/null +++ b/error_handling/errors5.rs @@ -0,0 +1,69 @@ +// errors5.rs +// +// This program uses an altered version of the code from errors4. +// +// This exercise uses some concepts that we won't get to until later in the +// course, like `Box` and the `From` trait. It's not important to understand +// them in detail right now, but you can read ahead if you like. For now, think +// of the `Box` type as an "I want anything that does ???" type, which, +// given Rust's usual standards for runtime safety, should strike you as +// somewhat lenient! +// +// In short, this particular use case for boxes is for when you want to own a +// value and you care only that it is a type which implements a particular +// trait. To do so, The Box is declared as of type Box where Trait is +// the trait the compiler looks for on any value used in that context. For this +// exercise, that context is the potential errors which can be returned in a +// Result. +// +// What can we use to describe both errors? In other words, is there a trait +// which both errors implement? +// +// Execute `rustlings hint errors5` or use the `hint` watch subcommand for a +// hint. + +use std::error; +use std::fmt; +use std::num::ParseIntError; + +// TODO: update the return type of `main()` to make this compile. +fn main() -> Result<(), Box> { + let pretend_user_input = "42"; + let x: i64 = pretend_user_input.parse()?; + println!("output={:?}", PositiveNonzeroInteger::new(x)?); + Ok(()) +} + +// Don't change anything below this line. + +#[derive(PartialEq, Debug)] +struct PositiveNonzeroInteger(u64); + +#[derive(PartialEq, Debug)] +enum CreationError { + Negative, + Zero, +} + +impl PositiveNonzeroInteger { + fn new(value: i64) -> Result { + match value { + x if x < 0 => Err(CreationError::Negative), + x if x == 0 => Err(CreationError::Zero), + x => Ok(PositiveNonzeroInteger(x as u64)), + } + } +} + +// This is required so that `CreationError` can implement `error::Error`. +impl fmt::Display for CreationError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let description = match *self { + CreationError::Negative => "number is negative", + CreationError::Zero => "number is zero", + }; + f.write_str(description) + } +} + +impl error::Error for CreationError {} diff --git a/error_handling/errors6.rs b/error_handling/errors6.rs new file mode 100644 index 0000000..08e6b68 --- /dev/null +++ b/error_handling/errors6.rs @@ -0,0 +1,93 @@ +// errors6.rs +// +// Using catch-all error types like `Box` isn't recommended +// for library code, where callers might want to make decisions based on the +// error content, instead of printing it out or propagating it further. Here, we +// define a custom error type to make it possible for callers to decide what to +// do next when our function returns an error. +// +// Execute `rustlings hint errors6` or use the `hint` watch subcommand for a +// hint. + +use std::num::ParseIntError; + +// This is a custom error type that we will be using in `parse_pos_nonzero()`. +#[derive(PartialEq, Debug)] +enum ParsePosNonzeroError { + Creation(CreationError), + ParseInt(ParseIntError), +} + +impl ParsePosNonzeroError { + fn from_creation(err: CreationError) -> ParsePosNonzeroError { + ParsePosNonzeroError::Creation(err) + } + fn from_parse_int(err: ParseIntError) -> ParsePosNonzeroError { + ParsePosNonzeroError::ParseInt(err) + } +} + +fn parse_pos_nonzero(s: &str) -> Result { + // TODO: change this to return an appropriate error instead of panicking + // when `parse()` returns an error. + let x: i64 = s.parse().map_err(ParsePosNonzeroError::from_parse_int)?; + PositiveNonzeroInteger::new(x).map_err(ParsePosNonzeroError::from_creation) +} + +// Don't change anything below this line. + +#[derive(PartialEq, Debug)] +struct PositiveNonzeroInteger(u64); + +#[derive(PartialEq, Debug)] +enum CreationError { + Negative, + Zero, +} + +impl PositiveNonzeroInteger { + fn new(value: i64) -> Result { + match value { + x if x < 0 => Err(CreationError::Negative), + x if x == 0 => Err(CreationError::Zero), + x => Ok(PositiveNonzeroInteger(x as u64)), + } + } +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_parse_error() { + // We can't construct a ParseIntError, so we have to pattern match. + assert!(matches!( + parse_pos_nonzero("not a number"), + Err(ParsePosNonzeroError::ParseInt(_)) + )); + } + + #[test] + fn test_negative() { + assert_eq!( + parse_pos_nonzero("-555"), + Err(ParsePosNonzeroError::Creation(CreationError::Negative)) + ); + } + + #[test] + fn test_zero() { + assert_eq!( + parse_pos_nonzero("0"), + Err(ParsePosNonzeroError::Creation(CreationError::Zero)) + ); + } + + #[test] + fn test_positive() { + let x = PositiveNonzeroInteger::new(42); + assert!(x.is_ok()); + assert_eq!(parse_pos_nonzero("42"), Ok(x.unwrap())); + } +} diff --git a/functions/README.md b/functions/README.md new file mode 100644 index 0000000..6662d0d --- /dev/null +++ b/functions/README.md @@ -0,0 +1,8 @@ +# Functions + +Here, you'll learn how to write functions and how the Rust compiler can help you debug errors even +in more complex code. + +## Further information + +- [How Functions Work](https://doc.rust-lang.org/book/ch03-03-how-functions-work.html) diff --git a/functions/functions1.rs b/functions/functions1.rs new file mode 100644 index 0000000..6dd20a1 --- /dev/null +++ b/functions/functions1.rs @@ -0,0 +1,10 @@ +// functions1.rs +// +// Execute `rustlings hint functions1` or use the `hint` watch subcommand for a +// hint. + +fn call_me() { +} +fn main() { + call_me(); +} diff --git a/functions/functions2.rs b/functions/functions2.rs new file mode 100644 index 0000000..08714f7 --- /dev/null +++ b/functions/functions2.rs @@ -0,0 +1,14 @@ +// functions2.rs +// +// Execute `rustlings hint functions2` or use the `hint` watch subcommand for a +// hint. + +fn main() { + call_me(3); +} + +fn call_me(num: u8) { + for i in 0..num { + println!("Ring! Call number {}", i + 1); + } +} diff --git a/functions/functions3.rs b/functions/functions3.rs new file mode 100644 index 0000000..4d6697a --- /dev/null +++ b/functions/functions3.rs @@ -0,0 +1,14 @@ +// functions3.rs +// +// Execute `rustlings hint functions3` or use the `hint` watch subcommand for a +// hint. + +fn main() { + call_me(3); +} + +fn call_me(num: u32) { + for i in 0..num { + println!("Ring! Call number {}", i + 1); + } +} diff --git a/functions/functions4.rs b/functions/functions4.rs new file mode 100644 index 0000000..aec6cf3 --- /dev/null +++ b/functions/functions4.rs @@ -0,0 +1,26 @@ +// functions4.rs +// +// This store is having a sale where if the price is an even number, you get 10 +// Rustbucks off, but if it's an odd number, it's 3 Rustbucks off. (Don't worry +// about the function bodies themselves, we're only interested in the signatures +// for now. If anything, this is a good way to peek ahead to future exercises!) +// +// Execute `rustlings hint functions4` or use the `hint` watch subcommand for a +// hint. + +fn main() { + let original_price = 51; + println!("Your sale price is {}", sale_price(original_price)); +} + +fn sale_price(price: i32) -> i32 { + if is_even(price) { + price - 10 + } else { + price - 3 + } +} + +fn is_even(num: i32) -> bool { + num % 2 == 0 +} diff --git a/functions/functions5.rs b/functions/functions5.rs new file mode 100644 index 0000000..c51bea9 --- /dev/null +++ b/functions/functions5.rs @@ -0,0 +1,13 @@ +// functions5.rs +// +// Execute `rustlings hint functions5` or use the `hint` watch subcommand for a +// hint. + +fn main() { + let answer = square(3); + println!("The square of 3 is {}", answer); +} + +fn square(num: i32) -> i32 { + num * num +} diff --git a/generics/README.md b/generics/README.md new file mode 100644 index 0000000..de46d50 --- /dev/null +++ b/generics/README.md @@ -0,0 +1,11 @@ +# Generics + +Generics is the topic of generalizing types and functionalities to broader cases. +This is extremely useful for reducing code duplication in many ways, but can call for rather involving syntax. +Namely, being generic requires taking great care to specify over which types a generic type is actually considered valid. +The simplest and most common use of generics is for type parameters. + +## Further information + +- [Generic Data Types](https://doc.rust-lang.org/stable/book/ch10-01-syntax.html) +- [Bounds](https://doc.rust-lang.org/rust-by-example/generics/bounds.html) diff --git a/generics/generics1.rs b/generics/generics1.rs new file mode 100644 index 0000000..1f4fa4a --- /dev/null +++ b/generics/generics1.rs @@ -0,0 +1,12 @@ +// generics1.rs +// +// This shopping list program isn't compiling! Use your knowledge of generics to +// fix it. +// +// Execute `rustlings hint generics1` or use the `hint` watch subcommand for a +// hint. + +fn main() { + let mut shopping_list: Vec<&str> = Vec::new(); + shopping_list.push("milk"); +} diff --git a/generics/generics2.rs b/generics/generics2.rs new file mode 100644 index 0000000..b0cc651 --- /dev/null +++ b/generics/generics2.rs @@ -0,0 +1,32 @@ +// generics2.rs +// +// This powerful wrapper provides the ability to store a positive integer value. +// Rewrite it using generics so that it supports wrapping ANY type. +// +// Execute `rustlings hint generics2` or use the `hint` watch subcommand for a +// hint. + +struct Wrapper { + value: T, +} + +impl Wrapper { + pub fn new(value: T) -> Self { + Wrapper { value } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn store_u32_in_wrapper() { + assert_eq!(Wrapper::new(42).value, 42); + } + + #[test] + fn store_str_in_wrapper() { + assert_eq!(Wrapper::new("Foo").value, "Foo"); + } +} diff --git a/hashmaps/README.md b/hashmaps/README.md new file mode 100644 index 0000000..80ec144 --- /dev/null +++ b/hashmaps/README.md @@ -0,0 +1,12 @@ +# Hashmaps + +A *hash map* allows you to associate a value with a particular key. +You may also know this by the names [*unordered map* in C++](https://en.cppreference.com/w/cpp/container/unordered_map), +[*dictionary* in Python](https://docs.python.org/3/tutorial/datastructures.html#dictionaries) or an *associative array* in other languages. + +This is the other data structure that we've been talking about before, when +talking about Vecs. + +## Further information + +- [Storing Keys with Associated Values in Hash Maps](https://doc.rust-lang.org/book/ch08-03-hash-maps.html) diff --git a/hashmaps/hashmaps1.rs b/hashmaps/hashmaps1.rs new file mode 100644 index 0000000..fb234c2 --- /dev/null +++ b/hashmaps/hashmaps1.rs @@ -0,0 +1,44 @@ +// hashmaps1.rs +// +// A basket of fruits in the form of a hash map needs to be defined. The key +// represents the name of the fruit and the value represents how many of that +// particular fruit is in the basket. You have to put at least three different +// types of fruits (e.g apple, banana, mango) in the basket and the total count +// of all the fruits should be at least five. +// +// Make me compile and pass the tests! +// +// Execute `rustlings hint hashmaps1` or use the `hint` watch subcommand for a +// hint. + +use std::collections::HashMap; + +fn fruit_basket() -> HashMap { + let mut basket = HashMap::new(); + + // Two bananas are already given for you :) + basket.insert(String::from("banana"), 2); + + // TODO: Put more fruits in your basket here. + basket.insert(String::from("apple"), 2); + basket.insert(String::from("orange"), 2); + + basket +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn at_least_three_types_of_fruits() { + let basket = fruit_basket(); + assert!(basket.len() >= 3); + } + + #[test] + fn at_least_five_fruits() { + let basket = fruit_basket(); + assert!(basket.values().sum::() >= 5); + } +} diff --git a/hashmaps/hashmaps2.rs b/hashmaps/hashmaps2.rs new file mode 100644 index 0000000..d6bd1d6 --- /dev/null +++ b/hashmaps/hashmaps2.rs @@ -0,0 +1,94 @@ +// hashmaps2.rs +// +// We're collecting different fruits to bake a delicious fruit cake. For this, +// we have a basket, which we'll represent in the form of a hash map. The key +// represents the name of each fruit we collect and the value represents how +// many of that particular fruit we have collected. Three types of fruits - +// Apple (4), Mango (2) and Lychee (5) are already in the basket hash map. You +// must add fruit to the basket so that there is at least one of each kind and +// more than 11 in total - we have a lot of mouths to feed. You are not allowed +// to insert any more of these fruits! +// +// Make me pass the tests! +// +// Execute `rustlings hint hashmaps2` or use the `hint` watch subcommand for a +// hint. + +use std::collections::HashMap; + +#[derive(Hash, PartialEq, Eq)] +enum Fruit { + Apple, + Banana, + Mango, + Lychee, + Pineapple, +} + +fn fruit_basket(basket: &mut HashMap) { + let fruit_kinds = vec![ + Fruit::Apple, + Fruit::Banana, + Fruit::Mango, + Fruit::Lychee, + Fruit::Pineapple, + ]; + + for fruit in fruit_kinds { + // TODO: Insert new fruits if they are not already present in the + // basket. Note that you are not allowed to put any type of fruit that's + // already present! + if !basket.contains_key(&fruit) { + basket.insert(fruit, 5); + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + // Don't modify this function! + fn get_fruit_basket() -> HashMap { + let mut basket = HashMap::::new(); + basket.insert(Fruit::Apple, 4); + basket.insert(Fruit::Mango, 2); + basket.insert(Fruit::Lychee, 5); + + basket + } + + #[test] + fn test_given_fruits_are_not_modified() { + let mut basket = get_fruit_basket(); + fruit_basket(&mut basket); + assert_eq!(*basket.get(&Fruit::Apple).unwrap(), 4); + assert_eq!(*basket.get(&Fruit::Mango).unwrap(), 2); + assert_eq!(*basket.get(&Fruit::Lychee).unwrap(), 5); + } + + #[test] + fn at_least_five_types_of_fruits() { + let mut basket = get_fruit_basket(); + fruit_basket(&mut basket); + let count_fruit_kinds = basket.len(); + assert!(count_fruit_kinds >= 5); + } + + #[test] + fn greater_than_eleven_fruits() { + let mut basket = get_fruit_basket(); + fruit_basket(&mut basket); + let count = basket.values().sum::(); + assert!(count > 11); + } + + #[test] + fn all_fruit_types_in_basket() { + let mut basket = get_fruit_basket(); + fruit_basket(&mut basket); + for amount in basket.values() { + assert_ne!(amount, &0); + } + } +} diff --git a/hashmaps/hashmaps3.rs b/hashmaps/hashmaps3.rs new file mode 100644 index 0000000..ea7f2ff --- /dev/null +++ b/hashmaps/hashmaps3.rs @@ -0,0 +1,106 @@ +// hashmaps3.rs +// +// A list of scores (one per line) of a soccer match is given. Each line is of +// the form : ",,," +// Example: England,France,4,2 (England scored 4 goals, France 2). +// +// You have to build a scores table containing the name of the team, goals the +// team scored, and goals the team conceded. One approach to build the scores +// table is to use a Hashmap. The solution is partially written to use a +// Hashmap, complete it to pass the test. +// +// Make me pass the tests! +// +// Execute `rustlings hint hashmaps3` or use the `hint` watch subcommand for a +// hint. + +use std::collections::HashMap; + +// A structure to store the goal details of a team. +struct Team { + goals_scored: u8, + goals_conceded: u8, +} + +fn build_scores_table(results: String) -> HashMap { + // The name of the team is the key and its associated struct is the value. + let mut scores: HashMap = HashMap::new(); + + for r in results.lines() { + let v: Vec<&str> = r.split(',').collect(); + let team_1_name = v[0].to_string(); + let team_1_score: u8 = v[2].parse().unwrap(); + let team_2_name = v[1].to_string(); + let team_2_score: u8 = v[3].parse().unwrap(); + // TODO: Populate the scores table with details extracted from the + // current line. Keep in mind that goals scored by team_1 + // will be the number of goals conceded from team_2, and similarly + // goals scored by team_2 will be the number of goals conceded by + // team_1. + + scores + .entry(team_1_name) + .and_modify(|team| { + team.goals_scored += team_1_score; + team.goals_conceded += team_2_score + }) + .or_insert(Team { + goals_scored: team_1_score, + goals_conceded: team_2_score, + }); + + scores + .entry(team_2_name) + .and_modify(|team| { + team.goals_scored += team_2_score; + team.goals_conceded += team_1_score + }) + .or_insert(Team { + goals_scored: team_2_score, + goals_conceded: team_1_score, + }); + } + scores +} + +#[cfg(test)] +mod tests { + use super::*; + + fn get_results() -> String { + let results = "".to_string() + + "England,France,4,2\n" + + "France,Italy,3,1\n" + + "Poland,Spain,2,0\n" + + "Germany,England,2,1\n"; + results + } + + #[test] + fn build_scores() { + let scores = build_scores_table(get_results()); + + let mut keys: Vec<&String> = scores.keys().collect(); + keys.sort(); + assert_eq!( + keys, + vec!["England", "France", "Germany", "Italy", "Poland", "Spain"] + ); + } + + #[test] + fn validate_team_score_1() { + let scores = build_scores_table(get_results()); + let team = scores.get("England").unwrap(); + assert_eq!(team.goals_scored, 5); + assert_eq!(team.goals_conceded, 4); + } + + #[test] + fn validate_team_score_2() { + let scores = build_scores_table(get_results()); + let team = scores.get("Spain").unwrap(); + assert_eq!(team.goals_scored, 0); + assert_eq!(team.goals_conceded, 2); + } +} diff --git a/if/README.md b/if/README.md new file mode 100644 index 0000000..b52c392 --- /dev/null +++ b/if/README.md @@ -0,0 +1,7 @@ +# If + +`if`, the most basic (but still surprisingly versatile!) type of control flow, is what you'll learn here. + +## Further information + +- [Control Flow - if expressions](https://doc.rust-lang.org/book/ch03-05-control-flow.html#if-expressions) diff --git a/if/if1.rs b/if/if1.rs new file mode 100644 index 0000000..df9eb43 --- /dev/null +++ b/if/if1.rs @@ -0,0 +1,32 @@ +// if1.rs +// +// Execute `rustlings hint if1` or use the `hint` watch subcommand for a hint. + +pub fn bigger(a: i32, b: i32) -> i32 { + if a > b { + a + } else { + b + } +} + +// Don't mind this for now :) +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn ten_is_bigger_than_eight() { + assert_eq!(10, bigger(10, 8)); + } + + #[test] + fn fortytwo_is_bigger_than_thirtytwo() { + assert_eq!(42, bigger(32, 42)); + } + + #[test] + fn equal_numbers() { + assert_eq!(42, bigger(42, 42)); + } +} diff --git a/if/if2.rs b/if/if2.rs new file mode 100644 index 0000000..9ae278f --- /dev/null +++ b/if/if2.rs @@ -0,0 +1,37 @@ +// if2.rs +// +// Step 1: Make me compile! +// Step 2: Get the bar_for_fuzz and default_to_baz tests passing! +// +// Execute `rustlings hint if2` or use the `hint` watch subcommand for a hint. + +pub fn foo_if_fizz(fizzish: &str) -> &str { + if fizzish == "fizz" { + "foo" + } else if fizzish == "fuzz" { + "bar" + } else { + "baz" + } +} + +// No test changes needed! +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn foo_for_fizz() { + assert_eq!(foo_if_fizz("fizz"), "foo") + } + + #[test] + fn bar_for_fuzz() { + assert_eq!(foo_if_fizz("fuzz"), "bar") + } + + #[test] + fn default_to_baz() { + assert_eq!(foo_if_fizz("literally anything"), "baz") + } +} diff --git a/if/if3.rs b/if/if3.rs new file mode 100644 index 0000000..9c99cd8 --- /dev/null +++ b/if/if3.rs @@ -0,0 +1,54 @@ +// if3.rs +// +// Execute `rustlings hint if3` or use the `hint` watch subcommand for a hint. + +pub fn animal_habitat(animal: &str) -> &'static str { + let identifier = if animal == "crab" { + 1 + } else if animal == "gopher" { + 2 + } else if animal == "snake" { + 3 + } else { + 0 + }; + + // DO NOT CHANGE THIS STATEMENT BELOW + let habitat = if identifier == 1 { + "Beach" + } else if identifier == 2 { + "Burrow" + } else if identifier == 3 { + "Desert" + } else { + "Unknown" + }; + + habitat +} + +// No test changes needed. +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn gopher_lives_in_burrow() { + assert_eq!(animal_habitat("gopher"), "Burrow") + } + + #[test] + fn snake_lives_in_desert() { + assert_eq!(animal_habitat("snake"), "Desert") + } + + #[test] + fn crab_lives_on_beach() { + assert_eq!(animal_habitat("crab"), "Beach") + } + + #[test] + fn unknown_animal() { + assert_eq!(animal_habitat("dinosaur"), "Unknown") + } +} diff --git a/intro/README.md b/intro/README.md new file mode 100644 index 0000000..d32e4a8 --- /dev/null +++ b/intro/README.md @@ -0,0 +1,8 @@ +# Intro + +Rust uses the `print!` and `println!` macros to print text to the console. + +## Further information + +- [Hello World](https://doc.rust-lang.org/rust-by-example/hello.html) +- [Formatted print](https://doc.rust-lang.org/rust-by-example/hello/print.html) diff --git a/intro/intro1.rs b/intro/intro1.rs new file mode 100644 index 0000000..6bb098a --- /dev/null +++ b/intro/intro1.rs @@ -0,0 +1,40 @@ +// intro1.rs +// +// About this `I AM NOT DONE` thing: +// We sometimes encourage you to keep trying things on a given exercise, even +// after you already figured it out. If you got everything working and feel +// ready for the next exercise, remove the `I AM NOT DONE` comment below. +// +// If you're running this using `rustlings watch`: The exercise file will be +// reloaded when you change one of the lines below! Try adding a `println!` +// line, or try changing what it outputs in your terminal. Try removing a +// semicolon and see what happens! +// +// Execute `rustlings hint intro1` or use the `hint` watch subcommand for a +// hint. + + +fn main() { + println!("Hello and"); + println!(r#" welcome to... "#); + println!(r#" _ _ _ "#); + println!(r#" _ __ _ _ ___| |_| (_)_ __ __ _ ___ "#); + println!(r#" | '__| | | / __| __| | | '_ \ / _` / __| "#); + println!(r#" | | | |_| \__ \ |_| | | | | | (_| \__ \ "#); + println!(r#" |_| \__,_|___/\__|_|_|_| |_|\__, |___/ "#); + println!(r#" |___/ "#); + println!(); + println!("This exercise compiles successfully. The remaining exercises contain a compiler"); + println!("or logic error. The central concept behind Rustlings is to fix these errors and"); + println!("solve the exercises. Good luck!"); + println!(); + println!("The source for this exercise is in `exercises/intro/intro1.rs`. Have a look!"); + println!( + "Going forward, the source of the exercises will always be in the success/failure output." + ); + println!(); + println!( + "If you want to use rust-analyzer, Rust's LSP implementation, make sure your editor is set" + ); + println!("up, and then run `rustlings lsp` before continuing.") +} diff --git a/intro/intro2.rs b/intro/intro2.rs new file mode 100644 index 0000000..c9f686c --- /dev/null +++ b/intro/intro2.rs @@ -0,0 +1,12 @@ +// intro2.rs +// +// Make the code print a greeting to the world. +// +// Execute `rustlings hint intro2` or use the `hint` watch subcommand for a +// hint. + + +fn main() { + let world = "World"; + println!("Hello {}!", world); +} diff --git a/iterators/README.md b/iterators/README.md new file mode 100644 index 0000000..0e8b671 --- /dev/null +++ b/iterators/README.md @@ -0,0 +1,8 @@ +# Iterators + +This section will teach you about Iterators. + +## Further information + +- [Iterator](https://doc.rust-lang.org/book/ch13-02-iterators.html) +- [Iterator documentation](https://doc.rust-lang.org/stable/std/iter/) diff --git a/iterators/iterators1.rs b/iterators/iterators1.rs new file mode 100644 index 0000000..40d58d4 --- /dev/null +++ b/iterators/iterators1.rs @@ -0,0 +1,23 @@ +// iterators1.rs +// +// When performing operations on elements within a collection, iterators are +// essential. This module helps you get familiar with the structure of using an +// iterator and how to go through elements within an iterable collection. +// +// Make me compile by filling in the `???`s +// +// Execute `rustlings hint iterators1` or use the `hint` watch subcommand for a +// hint. + +#[test] +fn main() { + let my_fav_fruits = vec!["banana", "custard apple", "avocado", "peach", "raspberry"]; + + let mut my_iterable_fav_fruits = my_fav_fruits.iter(); // TODO: Step 1 + + assert_eq!(my_iterable_fav_fruits.next(), Some(&"banana")); + assert_eq!(my_iterable_fav_fruits.next(), Some(&"custard apple")); // TODO: Step 2 + assert_eq!(my_iterable_fav_fruits.next(), Some(&"avocado")); + assert_eq!(my_iterable_fav_fruits.next(), Some(&"peach")); + assert_eq!(my_iterable_fav_fruits.next(), Some(&"raspberry")); +} diff --git a/iterators/iterators2.rs b/iterators/iterators2.rs new file mode 100644 index 0000000..afce7bd --- /dev/null +++ b/iterators/iterators2.rs @@ -0,0 +1,61 @@ +// iterators2.rs +// +// In this exercise, you'll learn some of the unique advantages that iterators +// can offer. Follow the steps to complete the exercise. +// +// Execute `rustlings hint iterators2` or use the `hint` watch subcommand for a +// hint. + +// Step 1. +// Complete the `capitalize_first` function. +// "hello" -> "Hello" +pub fn capitalize_first(input: &str) -> String { + let mut c = input.chars(); + match c.next() { + None => String::new(), + Some(first) => first.to_string().to_uppercase() + c.as_str(), + } +} + +// Step 2. +// Apply the `capitalize_first` function to a slice of string slices. +// Return a vector of strings. +// ["hello", "world"] -> ["Hello", "World"] +pub fn capitalize_words_vector(words: &[&str]) -> Vec { + words.iter().map(|word| capitalize_first(word)).collect() +} + +// Step 3. +// Apply the `capitalize_first` function again to a slice of string slices. +// Return a single string. +// ["hello", " ", "world"] -> "Hello World" +pub fn capitalize_words_string(words: &[&str]) -> String { + words.iter().map(|word| capitalize_first(word)).collect() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_success() { + assert_eq!(capitalize_first("hello"), "Hello"); + } + + #[test] + fn test_empty() { + assert_eq!(capitalize_first(""), ""); + } + + #[test] + fn test_iterate_string_vec() { + let words = vec!["hello", "world"]; + assert_eq!(capitalize_words_vector(&words), ["Hello", "World"]); + } + + #[test] + fn test_iterate_into_string() { + let words = vec!["hello", " ", "world"]; + assert_eq!(capitalize_words_string(&words), "Hello World"); + } +} diff --git a/iterators/iterators3.rs b/iterators/iterators3.rs new file mode 100644 index 0000000..5a2ebd1 --- /dev/null +++ b/iterators/iterators3.rs @@ -0,0 +1,101 @@ +// iterators3.rs +// +// This is a bigger exercise than most of the others! You can do it! Here is +// your mission, should you choose to accept it: +// 1. Complete the divide function to get the first four tests to pass. +// 2. Get the remaining tests to pass by completing the result_with_list and +// list_of_results functions. +// +// Execute `rustlings hint iterators3` or use the `hint` watch subcommand for a +// hint. + +#[derive(Debug, PartialEq, Eq)] +pub enum DivisionError { + NotDivisible(NotDivisibleError), + DivideByZero, +} + +#[derive(Debug, PartialEq, Eq)] +pub struct NotDivisibleError { + dividend: i32, + divisor: i32, +} + +// Calculate `a` divided by `b` if `a` is evenly divisible by `b`. +// Otherwise, return a suitable error. +pub fn divide(a: i32, b: i32) -> Result { + if b == 0 { + Err(DivisionError::DivideByZero) + } else if a == 0 { + Ok(0) + } else if a % b == 0 { + Ok(a / b) + } else { + Err(DivisionError::NotDivisible(NotDivisibleError { + dividend: a, + divisor: b, + })) + } +} + +// Complete the function and return a value of the correct type so the test +// passes. +// Desired output: Ok([1, 11, 1426, 3]) +fn result_with_list() -> Result, DivisionError> { + let numbers = vec![27, 297, 38502, 81]; + let division_results = numbers.into_iter().map(|n| divide(n, 27)).collect::, _>>(); + Ok(division_results.unwrap()) +} + +// Complete the function and return a value of the correct type so the test +// passes. +// Desired output: [Ok(1), Ok(11), Ok(1426), Ok(3)] +fn list_of_results() -> Vec> { + let numbers = vec![27, 297, 38502, 81]; + let division_results = numbers.into_iter().map(|n| divide(n, 27)).collect(); + division_results +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_success() { + assert_eq!(divide(81, 9), Ok(9)); + } + + #[test] + fn test_not_divisible() { + assert_eq!( + divide(81, 6), + Err(DivisionError::NotDivisible(NotDivisibleError { + dividend: 81, + divisor: 6 + })) + ); + } + + #[test] + fn test_divide_by_0() { + assert_eq!(divide(81, 0), Err(DivisionError::DivideByZero)); + } + + #[test] + fn test_divide_0_by_something() { + assert_eq!(divide(0, 81), Ok(0)); + } + + #[test] + fn test_result_with_list() { + assert_eq!(format!("{:?}", result_with_list()), "Ok([1, 11, 1426, 3])"); + } + + #[test] + fn test_list_of_results() { + assert_eq!( + format!("{:?}", list_of_results()), + "[Ok(1), Ok(11), Ok(1426), Ok(3)]" + ); + } +} diff --git a/iterators/iterators4.rs b/iterators/iterators4.rs new file mode 100644 index 0000000..4c0cea3 --- /dev/null +++ b/iterators/iterators4.rs @@ -0,0 +1,42 @@ +// iterators4.rs +// +// Execute `rustlings hint iterators4` or use the `hint` watch subcommand for a +// hint. + +pub fn factorial(mut num: u64) -> u64 { + // Complete this function to return the factorial of num + // Do not use: + // - return + // Try not to use: + // - imperative style loops (for, while) + // - additional variables + // For an extra challenge, don't use: + // - recursion + // Execute `rustlings hint iterators4` for hints. + + (1..=num).product() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn factorial_of_0() { + assert_eq!(1, factorial(0)); + } + + #[test] + fn factorial_of_1() { + assert_eq!(1, factorial(1)); + } + #[test] + fn factorial_of_2() { + assert_eq!(2, factorial(2)); + } + + #[test] + fn factorial_of_4() { + assert_eq!(24, factorial(4)); + } +} diff --git a/iterators/iterators5.rs b/iterators/iterators5.rs new file mode 100644 index 0000000..4a03bca --- /dev/null +++ b/iterators/iterators5.rs @@ -0,0 +1,156 @@ +// iterators5.rs +// +// Let's define a simple model to track Rustlings exercise progress. Progress +// will be modelled using a hash map. The name of the exercise is the key and +// the progress is the value. Two counting functions were created to count the +// number of exercises with a given progress. Recreate this counting +// functionality using iterators. Try not to use imperative loops (for, while). +// Only the two iterator methods (count_iterator and count_collection_iterator) +// need to be modified. +// +// Execute `rustlings hint iterators5` or use the `hint` watch subcommand for a +// hint. + +use std::collections::HashMap; + +#[derive(Clone, Copy, PartialEq, Eq)] +enum Progress { + None, + Some, + Complete, +} + +fn count_for(map: &HashMap, value: Progress) -> usize { + let mut count = 0; + for val in map.values() { + if val == &value { + count += 1; + } + } + count +} + +fn count_iterator(map: &HashMap, value: Progress) -> usize { + // map is a hashmap with String keys and Progress values. + // map = { "variables1": Complete, "from_str": None, ... } + map.iter().filter(|val| val.1 == &value).count() +} + +fn count_collection_for(collection: &[HashMap], value: Progress) -> usize { + let mut count = 0; + for map in collection { + for val in map.values() { + if val == &value { + count += 1; + } + } + } + count +} + +fn count_collection_iterator(collection: &[HashMap], value: Progress) -> usize { + // collection is a slice of hashmaps. + // collection = [{ "variables1": Complete, "from_str": None, ... }, + // { "variables2": Complete, ... }, ... ] + collection + .iter() + .fold(0, |acc, x| acc + count_iterator(x, value)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn count_complete() { + let map = get_map(); + assert_eq!(3, count_iterator(&map, Progress::Complete)); + } + + #[test] + fn count_some() { + let map = get_map(); + assert_eq!(1, count_iterator(&map, Progress::Some)); + } + + #[test] + fn count_none() { + let map = get_map(); + assert_eq!(2, count_iterator(&map, Progress::None)); + } + + #[test] + fn count_complete_equals_for() { + let map = get_map(); + let progress_states = vec![Progress::Complete, Progress::Some, Progress::None]; + for progress_state in progress_states { + assert_eq!( + count_for(&map, progress_state), + count_iterator(&map, progress_state) + ); + } + } + + #[test] + fn count_collection_complete() { + let collection = get_vec_map(); + assert_eq!( + 6, + count_collection_iterator(&collection, Progress::Complete) + ); + } + + #[test] + fn count_collection_some() { + let collection = get_vec_map(); + assert_eq!(1, count_collection_iterator(&collection, Progress::Some)); + } + + #[test] + fn count_collection_none() { + let collection = get_vec_map(); + assert_eq!(4, count_collection_iterator(&collection, Progress::None)); + } + + #[test] + fn count_collection_equals_for() { + let progress_states = vec![Progress::Complete, Progress::Some, Progress::None]; + let collection = get_vec_map(); + + for progress_state in progress_states { + assert_eq!( + count_collection_for(&collection, progress_state), + count_collection_iterator(&collection, progress_state) + ); + } + } + + fn get_map() -> HashMap { + use Progress::*; + + let mut map = HashMap::new(); + map.insert(String::from("variables1"), Complete); + map.insert(String::from("functions1"), Complete); + map.insert(String::from("hashmap1"), Complete); + map.insert(String::from("arc1"), Some); + map.insert(String::from("as_ref_mut"), None); + map.insert(String::from("from_str"), None); + + map + } + + fn get_vec_map() -> Vec> { + use Progress::*; + + let map = get_map(); + + let mut other = HashMap::new(); + other.insert(String::from("variables2"), Complete); + other.insert(String::from("functions2"), Complete); + other.insert(String::from("if1"), Complete); + other.insert(String::from("from_into"), None); + other.insert(String::from("try_from_into"), None); + + vec![map, other] + } +} diff --git a/lifetimes/README.md b/lifetimes/README.md new file mode 100644 index 0000000..91373f7 --- /dev/null +++ b/lifetimes/README.md @@ -0,0 +1,22 @@ +# Lifetimes + +Lifetimes tell the compiler how to check whether references live long +enough to be valid in any given situation. For example lifetimes say +"make sure parameter 'a' lives as long as parameter 'b' so that the return +value is valid". + +They are only necessary on borrows, i.e. references, +since copied parameters or moves are owned in their scope and cannot +be referenced outside. Lifetimes mean that calling code of e.g. functions +can be checked to make sure their arguments are valid. Lifetimes are +restrictive of their callers. + +If you'd like to learn more about lifetime annotations, the +[lifetimekata](https://tfpk.github.io/lifetimekata/) project +has a similar style of exercises to Rustlings, but is all about +learning to write lifetime annotations. + +## Further information + +- [Lifetimes (in Rust By Example)](https://doc.rust-lang.org/stable/rust-by-example/scope/lifetime.html) +- [Validating References with Lifetimes](https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html) diff --git a/lifetimes/lifetimes1.rs b/lifetimes/lifetimes1.rs new file mode 100644 index 0000000..5fe45ae --- /dev/null +++ b/lifetimes/lifetimes1.rs @@ -0,0 +1,25 @@ +// lifetimes1.rs +// +// The Rust compiler needs to know how to check whether supplied references are +// valid, so that it can let the programmer know if a reference is at risk of +// going out of scope before it is used. Remember, references are borrows and do +// not own their own data. What if their owner goes out of scope? +// +// Execute `rustlings hint lifetimes1` or use the `hint` watch subcommand for a +// hint. + +fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { + if x.len() > y.len() { + x + } else { + y + } +} + +fn main() { + let string1 = String::from("abcd"); + let string2 = "xyz"; + + let result = longest(string1.as_str(), string2); + println!("The longest string is '{}'", result); +} diff --git a/lifetimes/lifetimes2.rs b/lifetimes/lifetimes2.rs new file mode 100644 index 0000000..5df1e5b --- /dev/null +++ b/lifetimes/lifetimes2.rs @@ -0,0 +1,25 @@ +// lifetimes2.rs +// +// So if the compiler is just validating the references passed to the annotated +// parameters and the return type, what do we need to change? +// +// Execute `rustlings hint lifetimes2` or use the `hint` watch subcommand for a +// hint. + +fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { + if x.len() > y.len() { + x + } else { + y + } +} + +fn main() { + let string1 = String::from("long string is long"); + let result; + { + let string2 = String::from("xyz"); + result = longest(string1.as_str(), string2.as_str()); + println!("The longest string is '{}'", result); + } +} diff --git a/lifetimes/lifetimes3.rs b/lifetimes/lifetimes3.rs new file mode 100644 index 0000000..aede10d --- /dev/null +++ b/lifetimes/lifetimes3.rs @@ -0,0 +1,19 @@ +// lifetimes3.rs +// +// Lifetimes are also needed when structs hold references. +// +// Execute `rustlings hint lifetimes3` or use the `hint` watch subcommand for a +// hint. + +struct Book<'a> { + author: &'a str, + title: &'a str, +} + +fn main() { + let name = String::from("Jill Smith"); + let title = String::from("Fish Flying"); + let book = Book { author: &name, title: &title }; + + println!("{} by {}", book.title, book.author); +} diff --git a/macros/README.md b/macros/README.md new file mode 100644 index 0000000..337816d --- /dev/null +++ b/macros/README.md @@ -0,0 +1,14 @@ +# Macros + +Rust's macro system is very powerful, but also kind of difficult to wrap your +head around. We're not going to teach you how to write your own fully-featured +macros. Instead, we'll show you how to use and create them. + +If you'd like to learn more about writing your own macros, the +[macrokata](https://github.com/tfpk/macrokata) project has a similar style +of exercises to Rustlings, but is all about learning to write Macros. + +## Further information + +- [Macros](https://doc.rust-lang.org/book/ch19-06-macros.html) +- [The Little Book of Rust Macros](https://veykril.github.io/tlborm/) diff --git a/macros/macros1.rs b/macros/macros1.rs new file mode 100644 index 0000000..9d0edee --- /dev/null +++ b/macros/macros1.rs @@ -0,0 +1,14 @@ +// macros1.rs +// +// Execute `rustlings hint macros1` or use the `hint` watch subcommand for a +// hint. + +macro_rules! my_macro { + () => { + println!("Check out my macro!"); + }; +} + +fn main() { + my_macro!(); +} diff --git a/macros/macros2.rs b/macros/macros2.rs new file mode 100644 index 0000000..a87be19 --- /dev/null +++ b/macros/macros2.rs @@ -0,0 +1,14 @@ +// macros2.rs +// +// Execute `rustlings hint macros2` or use the `hint` watch subcommand for a +// hint. + +macro_rules! my_macro { + () => { + println!("Check out my macro!"); + }; +} + +fn main() { + my_macro!(); +} diff --git a/macros/macros3.rs b/macros/macros3.rs new file mode 100644 index 0000000..b5be9c3 --- /dev/null +++ b/macros/macros3.rs @@ -0,0 +1,19 @@ +// macros3.rs +// +// Make me compile, without taking the macro out of the module! +// +// Execute `rustlings hint macros3` or use the `hint` watch subcommand for a +// hint. + +#[macro_use] +mod macros { + macro_rules! my_macro { + () => { + println!("Check out my macro!"); + }; + } +} + +fn main() { + my_macro!(); +} diff --git a/macros/macros4.rs b/macros/macros4.rs new file mode 100644 index 0000000..45d8023 --- /dev/null +++ b/macros/macros4.rs @@ -0,0 +1,19 @@ +// macros4.rs +// +// Execute `rustlings hint macros4` or use the `hint` watch subcommand for a +// hint. + +#[rustfmt::skip] +macro_rules! my_macro { + () => { + println!("Check out my macro!"); + }; + ($val:expr) => { + println!("Look at this other macro: {}", $val); + } +} + +fn main() { + my_macro!(); + my_macro!(7777); +} diff --git a/modules/README.md b/modules/README.md new file mode 100644 index 0000000..3dc8a48 --- /dev/null +++ b/modules/README.md @@ -0,0 +1,7 @@ +# Modules + +In this section we'll give you an introduction to Rust's module system. + +## Further information + +- [The Module System](https://doc.rust-lang.org/book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html) diff --git a/modules/modules1.rs b/modules/modules1.rs new file mode 100644 index 0000000..a26f5c4 --- /dev/null +++ b/modules/modules1.rs @@ -0,0 +1,20 @@ +// modules1.rs +// +// Execute `rustlings hint modules1` or use the `hint` watch subcommand for a +// hint. + +mod sausage_factory { + // Don't let anybody outside of this module see this! + fn get_secret_recipe() -> String { + String::from("Ginger") + } + + pub fn make_sausage() { + get_secret_recipe(); + println!("sausage!"); + } +} + +fn main() { + sausage_factory::make_sausage(); +} diff --git a/modules/modules2.rs b/modules/modules2.rs new file mode 100644 index 0000000..f5bd7cc --- /dev/null +++ b/modules/modules2.rs @@ -0,0 +1,32 @@ +// modules2.rs +// +// You can bring module paths into scopes and provide new names for them with +// the 'use' and 'as' keywords. Fix these 'use' statements to make the code +// compile. +// +// Execute `rustlings hint modules2` or use the `hint` watch subcommand for a +// hint. + +mod delicious_snacks { + // TODO: Fix these use statements + pub use self::fruits::PEAR as fruit; + pub use self::veggies::CUCUMBER as veggie; + + mod fruits { + pub const PEAR: &'static str = "Pear"; + pub const APPLE: &'static str = "Apple"; + } + + mod veggies { + pub const CUCUMBER: &'static str = "Cucumber"; + pub const CARROT: &'static str = "Carrot"; + } +} + +fn main() { + println!( + "favorite snacks: {} and {}", + delicious_snacks::fruit, + delicious_snacks::veggie + ); +} diff --git a/modules/modules3.rs b/modules/modules3.rs new file mode 100644 index 0000000..fe54b07 --- /dev/null +++ b/modules/modules3.rs @@ -0,0 +1,19 @@ +// modules3.rs +// +// You can use the 'use' keyword to bring module paths from modules from +// anywhere and especially from the Rust standard library into your scope. Bring +// SystemTime and UNIX_EPOCH from the std::time module. Bonus style points if +// you can do it with one line! +// +// Execute `rustlings hint modules3` or use the `hint` watch subcommand for a +// hint. + +// TODO: Complete this use statement +use std::time::{SystemTime,UNIX_EPOCH}; + +fn main() { + match SystemTime::now().duration_since(UNIX_EPOCH) { + Ok(n) => println!("1970-01-01 00:00:00 UTC was {} seconds ago!", n.as_secs()), + Err(_) => panic!("SystemTime before UNIX EPOCH!"), + } +} diff --git a/move_semantics/README.md b/move_semantics/README.md new file mode 100644 index 0000000..54ddd8e --- /dev/null +++ b/move_semantics/README.md @@ -0,0 +1,10 @@ +# Move Semantics + +These exercises are adapted from [pnkfelix](https://github.com/pnkfelix)'s [Rust Tutorial](https://pnkfelix.github.io/rust-examples-icfp2014/) -- Thank you Felix!!! + +## Further information + +For this section, the book links are especially important. + +- [Ownership](https://doc.rust-lang.org/book/ch04-01-what-is-ownership.html) +- [Reference and borrowing](https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html) diff --git a/move_semantics/move_semantics1.rs b/move_semantics/move_semantics1.rs new file mode 100644 index 0000000..3b76ccc --- /dev/null +++ b/move_semantics/move_semantics1.rs @@ -0,0 +1,21 @@ +// move_semantics1.rs +// +// Execute `rustlings hint move_semantics1` or use the `hint` watch subcommand +// for a hint. + +#[test] +fn main() { + let vec0 = vec![22, 44, 66]; + + let vec1 = fill_vec(vec0); + + assert_eq!(vec1, vec![22, 44, 66, 88]); +} + +fn fill_vec(vec: Vec) -> Vec { + let mut vec = vec; + + vec.push(88); + + vec +} diff --git a/move_semantics/move_semantics2.rs b/move_semantics/move_semantics2.rs new file mode 100644 index 0000000..e3c0402 --- /dev/null +++ b/move_semantics/move_semantics2.rs @@ -0,0 +1,24 @@ +// move_semantics2.rs +// +// Make the test pass by finding a way to keep both Vecs separate! +// +// Execute `rustlings hint move_semantics2` or use the `hint` watch subcommand +// for a hint. + +#[test] +fn main() { + let vec0 = vec![22, 44, 66]; + + let mut vec1 = fill_vec(vec0.clone()); + + assert_eq!(vec0, vec![22, 44, 66]); + assert_eq!(vec1, vec![22, 44, 66, 88]); +} + +fn fill_vec(vec: Vec) -> Vec { + let mut vec = vec; + + vec.push(88); + + vec +} diff --git a/move_semantics/move_semantics3.rs b/move_semantics/move_semantics3.rs new file mode 100644 index 0000000..e989401 --- /dev/null +++ b/move_semantics/move_semantics3.rs @@ -0,0 +1,22 @@ +// move_semantics3.rs +// +// Make me compile without adding new lines -- just changing existing lines! (no +// lines with multiple semicolons necessary!) +// +// Execute `rustlings hint move_semantics3` or use the `hint` watch subcommand +// for a hint. + +#[test] +fn main() { + let vec0 = vec![22, 44, 66]; + + let vec1 = fill_vec(vec0); + + assert_eq!(vec1, vec![22, 44, 66, 88]); +} + +fn fill_vec(mut vec: Vec) -> Vec { + vec.push(88); + + vec +} diff --git a/move_semantics/move_semantics4.rs b/move_semantics/move_semantics4.rs new file mode 100644 index 0000000..f301242 --- /dev/null +++ b/move_semantics/move_semantics4.rs @@ -0,0 +1,25 @@ +// move_semantics4.rs +// +// Refactor this code so that instead of passing `vec0` into the `fill_vec` +// function, the Vector gets created in the function itself and passed back to +// the main function. +// +// Execute `rustlings hint move_semantics4` or use the `hint` watch subcommand +// for a hint. + +#[test] +fn main() { + + let mut vec1 = fill_vec(); + + assert_eq!(vec1, vec![22, 44, 66, 88]); +} + +// `fill_vec()` no longer takes `vec: Vec` as argument - don't change this! +fn fill_vec() -> Vec { + let mut vec = vec![22, 44, 66]; + + vec.push(88); + + vec +} diff --git a/move_semantics/move_semantics5.rs b/move_semantics/move_semantics5.rs new file mode 100644 index 0000000..3e26f26 --- /dev/null +++ b/move_semantics/move_semantics5.rs @@ -0,0 +1,17 @@ +// move_semantics5.rs +// +// Make me compile only by reordering the lines in `main()`, but without adding, +// changing or removing any of them. +// +// Execute `rustlings hint move_semantics5` or use the `hint` watch subcommand +// for a hint. + +#[test] +fn main() { + let mut x = 100; + let y = &mut x; + *y += 100; + let z = &mut x; + *z += 1000; + assert_eq!(x, 1200); +} diff --git a/move_semantics/move_semantics6.rs b/move_semantics/move_semantics6.rs new file mode 100644 index 0000000..f00dab1 --- /dev/null +++ b/move_semantics/move_semantics6.rs @@ -0,0 +1,26 @@ +// move_semantics6.rs +// +// You can't change anything except adding or removing references. +// +// Execute `rustlings hint move_semantics6` or use the `hint` watch subcommand +// for a hint. + +fn main() { + let data = "Rust is great!".to_string(); + + get_char(&data); + + string_uppercase(data); +} + +// Should not take ownership +fn get_char(data: &String) -> char { + data.chars().last().unwrap() +} + +// Should take ownership +fn string_uppercase(mut data: String) { + data = data.to_uppercase(); + + println!("{}", data); +} diff --git a/options/README.md b/options/README.md new file mode 100644 index 0000000..bdd3374 --- /dev/null +++ b/options/README.md @@ -0,0 +1,21 @@ +# Options + +Type Option represents an optional value: every Option is either Some and contains a value, or None, and does not. +Option types are very common in Rust code, as they have a number of uses: + +- Initial values +- Return values for functions that are not defined over their entire input range (partial functions) +- Return value for otherwise reporting simple errors, where None is returned on error +- Optional struct fields +- Struct fields that can be loaned or "taken" +- Optional function arguments +- Nullable pointers +- Swapping things out of difficult situations + +## Further Information + +- [Option Enum Format](https://doc.rust-lang.org/stable/book/ch10-01-syntax.html#in-enum-definitions) +- [Option Module Documentation](https://doc.rust-lang.org/std/option/) +- [Option Enum Documentation](https://doc.rust-lang.org/std/option/enum.Option.html) +- [if let](https://doc.rust-lang.org/rust-by-example/flow_control/if_let.html) +- [while let](https://doc.rust-lang.org/rust-by-example/flow_control/while_let.html) diff --git a/options/options1.rs b/options/options1.rs new file mode 100644 index 0000000..06c7cd5 --- /dev/null +++ b/options/options1.rs @@ -0,0 +1,44 @@ +// options1.rs +// +// Execute `rustlings hint options1` or use the `hint` watch subcommand for a +// hint. + +// This function returns how much icecream there is left in the fridge. +// If it's before 10PM, there's 5 pieces left. At 10PM, someone eats them +// all, so there'll be no more left :( +fn maybe_icecream(time_of_day: u16) -> Option { + // We use the 24-hour system here, so 10PM is a value of 22 and 12AM is a + // value of 0 The Option output should gracefully handle cases where + // time_of_day > 23. + // TODO: Complete the function body - remember to return an Option! + + if time_of_day < 22 { + Some(5) + } else if time_of_day > 24 { + None + } else { + Some(0) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn check_icecream() { + assert_eq!(maybe_icecream(9), Some(5)); + assert_eq!(maybe_icecream(10), Some(5)); + assert_eq!(maybe_icecream(23), Some(0)); + assert_eq!(maybe_icecream(22), Some(0)); + assert_eq!(maybe_icecream(25), None); + } + + #[test] + fn raw_value() { + // TODO: Fix this test. How do you get at the value contained in the + // Option? + let icecreams = maybe_icecream(12); + assert_eq!(icecreams, Some(5)); + } +} diff --git a/options/options2.rs b/options/options2.rs new file mode 100644 index 0000000..cbf281f --- /dev/null +++ b/options/options2.rs @@ -0,0 +1,40 @@ +// options2.rs +// +// Execute `rustlings hint options2` or use the `hint` watch subcommand for a +// hint. + +#[cfg(test)] +mod tests { + #[test] + fn simple_option() { + let target = "rustlings"; + let optional_target = Some(target); + + // TODO: Make this an if let statement whose value is "Some" type + if let Some(word) = optional_target { + assert_eq!(word, target); + } + } + + #[test] + fn layered_option() { + let range = 10; + let mut optional_integers: Vec> = vec![None]; + + for i in 1..(range + 1) { + optional_integers.push(Some(i)); + } + + let mut cursor = range; + + // TODO: make this a while let statement - remember that vector.pop also + // adds another layer of Option. You can stack `Option`s into + // while let and if let. + while let Some(Some(integer)) = optional_integers.pop() { + assert_eq!(integer, cursor); + cursor -= 1; + } + + assert_eq!(cursor, 0); + } +} diff --git a/options/options3.rs b/options/options3.rs new file mode 100644 index 0000000..bca3cff --- /dev/null +++ b/options/options3.rs @@ -0,0 +1,19 @@ +// options3.rs +// +// Execute `rustlings hint options3` or use the `hint` watch subcommand for a +// hint. + +struct Point { + x: i32, + y: i32, +} + +fn main() { + let y: Option = Some(Point { x: 100, y: 200 }); + + match y { + Some(ref p) => println!("Co-ordinates are {},{} ", p.x, p.y), + _ => panic!("no match!"), + } + y; // Fix without deleting this line. +} diff --git a/primitive_types/README.md b/primitive_types/README.md new file mode 100644 index 0000000..cea69b0 --- /dev/null +++ b/primitive_types/README.md @@ -0,0 +1,9 @@ +# Primitive Types + +Rust has a couple of basic types that are directly implemented into the +compiler. In this section, we'll go through the most important ones. + +## Further information + +- [Data Types](https://doc.rust-lang.org/stable/book/ch03-02-data-types.html) +- [The Slice Type](https://doc.rust-lang.org/stable/book/ch04-03-slices.html) diff --git a/primitive_types/primitive_types1.rs b/primitive_types/primitive_types1.rs new file mode 100644 index 0000000..9fcc5d0 --- /dev/null +++ b/primitive_types/primitive_types1.rs @@ -0,0 +1,18 @@ +// primitive_types1.rs +// +// Fill in the rest of the line that has code missing! No hints, there's no +// tricks, just get used to typing these :) + +fn main() { + // Booleans (`bool`) + + let is_morning = true; + if is_morning { + println!("Good morning!"); + } + + let is_evening = true; + if is_evening { + println!("Good evening!"); + } +} diff --git a/primitive_types/primitive_types2.rs b/primitive_types/primitive_types2.rs new file mode 100644 index 0000000..418efb3 --- /dev/null +++ b/primitive_types/primitive_types2.rs @@ -0,0 +1,31 @@ +// primitive_types2.rs +// +// Fill in the rest of the line that has code missing! No hints, there's no +// tricks, just get used to typing these :) + +fn main() { + // Characters (`char`) + + // Note the _single_ quotes, these are different from the double quotes + // you've been seeing around. + let my_first_initial = 'C'; + if my_first_initial.is_alphabetic() { + println!("Alphabetical!"); + } else if my_first_initial.is_numeric() { + println!("Numerical!"); + } else { + println!("Neither alphabetic nor numeric!"); + } + + let your_character = '3'; + // Finish this line like the example! What's your favorite character? + // Try a letter, try a number, try a special character, try a character + // from a different language than your own, try an emoji! + if your_character.is_alphabetic() { + println!("Alphabetical!"); + } else if your_character.is_numeric() { + println!("Numerical!"); + } else { + println!("Neither alphabetic nor numeric!"); + } +} diff --git a/primitive_types/primitive_types3.rs b/primitive_types/primitive_types3.rs new file mode 100644 index 0000000..872876b --- /dev/null +++ b/primitive_types/primitive_types3.rs @@ -0,0 +1,17 @@ +// primitive_types3.rs +// +// Create an array with at least 100 elements in it where the ??? is. +// +// Execute `rustlings hint primitive_types3` or use the `hint` watch subcommand +// for a hint. + +fn main() { + let a = [69; 100]; + + if a.len() >= 100 { + println!("Wow, that's a big array!"); + } else { + println!("Meh, I eat arrays like that for breakfast."); + panic!("Array not big enough, more elements needed") + } +} diff --git a/primitive_types/primitive_types4.rs b/primitive_types/primitive_types4.rs new file mode 100644 index 0000000..c5fb63c --- /dev/null +++ b/primitive_types/primitive_types4.rs @@ -0,0 +1,15 @@ +// primitive_types4.rs +// +// Get a slice out of Array a where the ??? is so that the test passes. +// +// Execute `rustlings hint primitive_types4` or use the `hint` watch subcommand +// for a hint. + +#[test] +fn slice_out_of_array() { + let a: [u8; 5] = [1, 2, 3, 4, 5]; + + let nice_slice = &a[1..4]; + + assert_eq!([2, 3, 4], nice_slice) +} diff --git a/primitive_types/primitive_types5.rs b/primitive_types/primitive_types5.rs new file mode 100644 index 0000000..7a33044 --- /dev/null +++ b/primitive_types/primitive_types5.rs @@ -0,0 +1,13 @@ +// primitive_types5.rs +// +// Destructure the `cat` tuple so that the println will work. +// +// Execute `rustlings hint primitive_types5` or use the `hint` watch subcommand +// for a hint. + +fn main() { + let cat = ("Furry McFurson", 3.5); + let (name, age) = cat; + + println!("{} is {} years old.", name, age); +} diff --git a/primitive_types/primitive_types6.rs b/primitive_types/primitive_types6.rs new file mode 100644 index 0000000..0ed7cfd --- /dev/null +++ b/primitive_types/primitive_types6.rs @@ -0,0 +1,17 @@ +// primitive_types6.rs +// +// Use a tuple index to access the second element of `numbers`. You can put the +// expression for the second element where ??? is so that the test passes. +// +// Execute `rustlings hint primitive_types6` or use the `hint` watch subcommand +// for a hint. + +#[test] +fn indexing_tuple() { + let numbers = (1, 2, 3); + // Replace below ??? with the tuple indexing syntax. + let second = numbers.1; + + assert_eq!(2, second, + "This is not the 2nd number in the tuple!") +} diff --git a/quiz1.rs b/quiz1.rs new file mode 100644 index 0000000..43988df --- /dev/null +++ b/quiz1.rs @@ -0,0 +1,38 @@ +// quiz1.rs +// +// This is a quiz for the following sections: +// - Variables +// - Functions +// - If +// +// Mary is buying apples. The price of an apple is calculated as follows: +// - An apple costs 2 rustbucks. +// - If Mary buys more than 40 apples, each apple only costs 1 rustbuck! +// Write a function that calculates the price of an order of apples given the +// quantity bought. +// +// No hints this time ;) + +fn calculate_price_of_apples(qty: u8) -> u8 { + let price = if qty > 40 { + 1 + } else { + 2 + }; + + qty * price +} + +// Don't modify this function! +#[test] +fn verify_test() { + let price1 = calculate_price_of_apples(35); + let price2 = calculate_price_of_apples(40); + let price3 = calculate_price_of_apples(41); + let price4 = calculate_price_of_apples(65); + + assert_eq!(70, price1); + assert_eq!(80, price2); + assert_eq!(41, price3); + assert_eq!(65, price4); +} diff --git a/quiz2.rs b/quiz2.rs new file mode 100644 index 0000000..e0e91f9 --- /dev/null +++ b/quiz2.rs @@ -0,0 +1,70 @@ +// quiz2.rs +// +// This is a quiz for the following sections: +// - Strings +// - Vecs +// - Move semantics +// - Modules +// - Enums +// +// Let's build a little machine in the form of a function. As input, we're going +// to give a list of strings and commands. These commands determine what action +// is going to be applied to the string. It can either be: +// - Uppercase the string +// - Trim the string +// - Append "bar" to the string a specified amount of times +// The exact form of this will be: +// - The input is going to be a Vector of a 2-length tuple, +// the first element is the string, the second one is the command. +// - The output element is going to be a Vector of strings. +// +// No hints this time! + +pub enum Command { + Uppercase, + Trim, + Append(usize), +} + +mod my_module { + use super::Command; + + // TODO: Complete the function signature! + pub fn transformer(input: Vec<(String, Command)>) -> Vec { + let mut output: Vec = vec![]; + + for (string, command) in input.iter() { + match command { + Command::Uppercase => output.push(string.to_uppercase()), + Command::Trim => output.push(string.trim().to_string()), + Command::Append(n) => output.push(format!( + "{}{}", + string.to_string(), + std::iter::repeat("bar").take(*n).collect::() + )), + }; + } + output + } +} + +#[cfg(test)] +mod tests { + // TODO: What do we need to import to have `transformer` in scope? + use super::Command; + use crate::my_module::transformer; + + #[test] + fn it_works() { + let output = transformer(vec![ + ("hello".into(), Command::Uppercase), + (" all roads lead to rome! ".into(), Command::Trim), + ("foo".into(), Command::Append(1)), + ("bar".into(), Command::Append(5)), + ]); + assert_eq!(output[0], "HELLO"); + assert_eq!(output[1], "all roads lead to rome!"); + assert_eq!(output[2], "foobar"); + assert_eq!(output[3], "barbarbarbarbarbar"); + } +} diff --git a/quiz3.rs b/quiz3.rs new file mode 100644 index 0000000..ceecf4f --- /dev/null +++ b/quiz3.rs @@ -0,0 +1,64 @@ +// quiz3.rs +// +// This quiz tests: +// - Generics +// - Traits +// +// An imaginary magical school has a new report card generation system written +// in Rust! Currently the system only supports creating report cards where the +// student's grade is represented numerically (e.g. 1.0 -> 5.5). However, the +// school also issues alphabetical grades (A+ -> F-) and needs to be able to +// print both types of report card! +// +// Make the necessary code changes in the struct ReportCard and the impl block +// to support alphabetical report cards. Change the Grade in the second test to +// "A+" to show that your changes allow alphabetical grades. +// +// Execute `rustlings hint quiz3` or use the `hint` watch subcommand for a hint. + +use std::fmt::Display; + +pub struct ReportCard { + pub grade: T, + pub student_name: String, + pub student_age: u8, +} + +impl ReportCard { + pub fn print(&self) -> String { + format!("{} ({}) - achieved a grade of {}", + &self.student_name, &self.student_age, &self.grade) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn generate_numeric_report_card() { + let report_card = ReportCard { + grade: 2.1, + student_name: "Tom Wriggle".to_string(), + student_age: 12, + }; + assert_eq!( + report_card.print(), + "Tom Wriggle (12) - achieved a grade of 2.1" + ); + } + + #[test] + fn generate_alphabetic_report_card() { + // TODO: Make sure to change the grade here after you finish the exercise. + let report_card = ReportCard { + grade: "A+", + student_name: "Gary Plotter".to_string(), + student_age: 11, + }; + assert_eq!( + report_card.print(), + "Gary Plotter (11) - achieved a grade of A+" + ); + } +} diff --git a/smart_pointers/README.md b/smart_pointers/README.md new file mode 100644 index 0000000..d56d2b6 --- /dev/null +++ b/smart_pointers/README.md @@ -0,0 +1,12 @@ +# Smart Pointers + +In Rust, smart pointers are variables that contain an address in memory and reference some other data, but they also have additional metadata and capabilities. +Smart pointers in Rust often own the data they point to, while references only borrow data. + +## Further Information + +- [Smart Pointers](https://doc.rust-lang.org/book/ch15-00-smart-pointers.html) +- [Using Box to Point to Data on the Heap](https://doc.rust-lang.org/book/ch15-01-box.html) +- [Rc\, the Reference Counted Smart Pointer](https://doc.rust-lang.org/book/ch15-04-rc.html) +- [Shared-State Concurrency](https://doc.rust-lang.org/book/ch16-03-shared-state.html) +- [Cow Documentation](https://doc.rust-lang.org/std/borrow/enum.Cow.html) diff --git a/smart_pointers/arc1.rs b/smart_pointers/arc1.rs new file mode 100644 index 0000000..c4e2ff0 --- /dev/null +++ b/smart_pointers/arc1.rs @@ -0,0 +1,43 @@ +// arc1.rs +// +// In this exercise, we are given a Vec of u32 called "numbers" with values +// ranging from 0 to 99 -- [ 0, 1, 2, ..., 98, 99 ] We would like to use this +// set of numbers within 8 different threads simultaneously. Each thread is +// going to get the sum of every eighth value, with an offset. +// +// The first thread (offset 0), will sum 0, 8, 16, ... +// The second thread (offset 1), will sum 1, 9, 17, ... +// The third thread (offset 2), will sum 2, 10, 18, ... +// ... +// The eighth thread (offset 7), will sum 7, 15, 23, ... +// +// Because we are using threads, our values need to be thread-safe. Therefore, +// we are using Arc. We need to make a change in each of the two TODOs. +// +// Make this code compile by filling in a value for `shared_numbers` where the +// first TODO comment is, and create an initial binding for `child_numbers` +// where the second TODO comment is. Try not to create any copies of the +// `numbers` Vec! +// +// Execute `rustlings hint arc1` or use the `hint` watch subcommand for a hint. + +#![forbid(unused_imports)] // Do not change this, (or the next) line. +use std::sync::Arc; +use std::thread; + +fn main() { + let numbers: Vec<_> = (0..100u32).collect(); + let shared_numbers = Arc::new(numbers); + let mut joinhandles = Vec::new(); + + for offset in 0..8 { + let child_numbers = shared_numbers.clone(); + joinhandles.push(thread::spawn(move || { + let sum: u32 = child_numbers.iter().filter(|&&n| n % 8 == offset).sum(); + println!("Sum of offset {} is {}", offset, sum); + })); + } + for handle in joinhandles.into_iter() { + handle.join().unwrap(); + } +} diff --git a/smart_pointers/box1.rs b/smart_pointers/box1.rs new file mode 100644 index 0000000..2da338b --- /dev/null +++ b/smart_pointers/box1.rs @@ -0,0 +1,56 @@ +// box1.rs +// +// At compile time, Rust needs to know how much space a type takes up. This +// becomes problematic for recursive types, where a value can have as part of +// itself another value of the same type. To get around the issue, we can use a +// `Box` - a smart pointer used to store data on the heap, which also allows us +// to wrap a recursive type. +// +// The recursive type we're implementing in this exercise is the `cons list` - a +// data structure frequently found in functional programming languages. Each +// item in a cons list contains two elements: the value of the current item and +// the next item. The last item is a value called `Nil`. +// +// Step 1: use a `Box` in the enum definition to make the code compile +// Step 2: create both empty and non-empty cons lists by replacing `todo!()` +// +// Note: the tests should not be changed +// +// Execute `rustlings hint box1` or use the `hint` watch subcommand for a hint. + +#[derive(PartialEq, Debug)] +pub enum List { + Cons(i32, Box), + Nil, +} + +fn main() { + println!("This is an empty cons list: {:?}", create_empty_list()); + println!( + "This is a non-empty cons list: {:?}", + create_non_empty_list() + ); +} + +pub fn create_empty_list() -> List { + List::Nil +} + +pub fn create_non_empty_list() -> List { + List::Cons(3, Box::new(List::Nil)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_create_empty_list() { + assert_eq!(List::Nil, create_empty_list()) + } + + #[test] + fn test_create_non_empty_list() { + assert_ne!(create_empty_list(), create_non_empty_list()) + } +} diff --git a/smart_pointers/cow1.rs b/smart_pointers/cow1.rs new file mode 100644 index 0000000..5816e5c --- /dev/null +++ b/smart_pointers/cow1.rs @@ -0,0 +1,79 @@ +// cow1.rs +// +// This exercise explores the Cow, or Clone-On-Write type. Cow is a +// clone-on-write smart pointer. It can enclose and provide immutable access to +// borrowed data, and clone the data lazily when mutation or ownership is +// required. The type is designed to work with general borrowed data via the +// Borrow trait. +// +// This exercise is meant to show you what to expect when passing data to Cow. +// Fix the unit tests by checking for Cow::Owned(_) and Cow::Borrowed(_) at the +// TODO markers. +// +// Execute `rustlings hint cow1` or use the `hint` watch subcommand for a hint. + +use std::borrow::Cow; + +fn abs_all<'a, 'b>(input: &'a mut Cow<'b, [i32]>) -> &'a mut Cow<'b, [i32]> { + for i in 0..input.len() { + let v = input[i]; + if v < 0 { + // Clones into a vector if not already owned. + input.to_mut()[i] = -v; + } + } + input +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn reference_mutation() -> Result<(), &'static str> { + // Clone occurs because `input` needs to be mutated. + let slice = [-1, 0, 1]; + let mut input = Cow::from(&slice[..]); + match abs_all(&mut input) { + Cow::Owned(_) => Ok(()), + _ => Err("Expected owned value"), + } + } + + #[test] + fn reference_no_mutation() -> Result<(), &'static str> { + // No clone occurs because `input` doesn't need to be mutated. + let slice = [0, 1, 2]; + let mut input = Cow::from(&slice[..]); + match abs_all(&mut input) { + Cow::Borrowed(_) => Ok(()), + _ => Err("Expected borrowed value"), + } + } + + #[test] + fn owned_no_mutation() -> Result<(), &'static str> { + // We can also pass `slice` without `&` so Cow owns it directly. In this + // case no mutation occurs and thus also no clone, but the result is + // still owned because it was never borrowed or mutated. + let slice = vec![0, 1, 2]; + let mut input = Cow::from(slice); + match abs_all(&mut input) { + Cow::Owned(_) => Ok(()), + _ => Err("Expected owned value"), + } + } + + #[test] + fn owned_mutation() -> Result<(), &'static str> { + // Of course this is also the case if a mutation does occur. In this + // case the call to `to_mut()` in the abs_all() function returns a + // reference to the same data as before. + let slice = vec![-1, 0, 1]; + let mut input = Cow::from(slice); + match abs_all(&mut input) { + Cow::Owned(_) => Ok(()), + _ => Err("Expected owned value"), + } + } +} diff --git a/smart_pointers/rc1.rs b/smart_pointers/rc1.rs new file mode 100644 index 0000000..f6e420a --- /dev/null +++ b/smart_pointers/rc1.rs @@ -0,0 +1,103 @@ +// rc1.rs +// +// In this exercise, we want to express the concept of multiple owners via the +// Rc type. This is a model of our solar system - there is a Sun type and +// multiple Planets. The Planets take ownership of the sun, indicating that they +// revolve around the sun. +// +// Make this code compile by using the proper Rc primitives to express that the +// sun has multiple owners. +// +// Execute `rustlings hint rc1` or use the `hint` watch subcommand for a hint. + +use std::rc::Rc; + +#[derive(Debug)] +struct Sun {} + +#[derive(Debug)] +enum Planet { + Mercury(Rc), + Venus(Rc), + Earth(Rc), + Mars(Rc), + Jupiter(Rc), + Saturn(Rc), + Uranus(Rc), + Neptune(Rc), +} + +impl Planet { + fn details(&self) { + println!("Hi from {:?}!", self) + } +} + +#[test] +fn main() { + let sun = Rc::new(Sun {}); + println!("reference count = {}", Rc::strong_count(&sun)); // 1 reference + + let mercury = Planet::Mercury(Rc::clone(&sun)); + println!("reference count = {}", Rc::strong_count(&sun)); // 2 references + mercury.details(); + + let venus = Planet::Venus(Rc::clone(&sun)); + println!("reference count = {}", Rc::strong_count(&sun)); // 3 references + venus.details(); + + let earth = Planet::Earth(Rc::clone(&sun)); + println!("reference count = {}", Rc::strong_count(&sun)); // 4 references + earth.details(); + + let mars = Planet::Mars(Rc::clone(&sun)); + println!("reference count = {}", Rc::strong_count(&sun)); // 5 references + mars.details(); + + let jupiter = Planet::Jupiter(Rc::clone(&sun)); + println!("reference count = {}", Rc::strong_count(&sun)); // 6 references + jupiter.details(); + + // TODO + let saturn = Planet::Saturn(Rc::clone(&sun)); + println!("reference count = {}", Rc::strong_count(&sun)); // 7 references + saturn.details(); + + // TODO + let uranus = Planet::Uranus(Rc::clone(&sun)); + println!("reference count = {}", Rc::strong_count(&sun)); // 8 references + uranus.details(); + + // TODO + let neptune = Planet::Neptune(Rc::clone(&sun)); + println!("reference count = {}", Rc::strong_count(&sun)); // 9 references + neptune.details(); + + assert_eq!(Rc::strong_count(&sun), 9); + + drop(neptune); + println!("reference count = {}", Rc::strong_count(&sun)); // 8 references + + drop(uranus); + println!("reference count = {}", Rc::strong_count(&sun)); // 7 references + + drop(saturn); + println!("reference count = {}", Rc::strong_count(&sun)); // 6 references + + drop(jupiter); + println!("reference count = {}", Rc::strong_count(&sun)); // 5 references + + drop(mars); + println!("reference count = {}", Rc::strong_count(&sun)); // 4 references + + drop(earth); + println!("reference count = {}", Rc::strong_count(&sun)); // 3 references + + drop(venus); + println!("reference count = {}", Rc::strong_count(&sun)); // 2 references + + drop(mercury); + println!("reference count = {}", Rc::strong_count(&sun)); // 1 reference + + assert_eq!(Rc::strong_count(&sun), 1); +} diff --git a/strings/README.md b/strings/README.md new file mode 100644 index 0000000..fa2104c --- /dev/null +++ b/strings/README.md @@ -0,0 +1,9 @@ +# Strings + +Rust has two string types, a string slice (`&str`) and an owned string (`String`). +We're not going to dictate when you should use which one, but we'll show you how +to identify and create them, as well as use them. + +## Further information + +- [Strings](https://doc.rust-lang.org/book/ch08-02-strings.html) diff --git a/strings/strings1.rs b/strings/strings1.rs new file mode 100644 index 0000000..e789b8f --- /dev/null +++ b/strings/strings1.rs @@ -0,0 +1,15 @@ +// strings1.rs +// +// Make me compile without changing the function signature! +// +// Execute `rustlings hint strings1` or use the `hint` watch subcommand for a +// hint. + +fn main() { + let answer = current_favorite_color(); + println!("My current favorite color is {}", answer); +} + +fn current_favorite_color() -> String { + "blue".to_string() +} diff --git a/strings/strings2.rs b/strings/strings2.rs new file mode 100644 index 0000000..10f0a73 --- /dev/null +++ b/strings/strings2.rs @@ -0,0 +1,20 @@ +// strings2.rs +// +// Make me compile without changing the function signature! +// +// Execute `rustlings hint strings2` or use the `hint` watch subcommand for a +// hint. + + +fn main() { + let word = String::from("green"); // Try not changing this line :) + if is_a_color_word(&word) { + println!("That is a color word I know!"); + } else { + println!("That is not a color word I know."); + } +} + +fn is_a_color_word(attempt: &str) -> bool { + attempt == "green" || attempt == "blue" || attempt == "red" +} diff --git a/strings/strings3.rs b/strings/strings3.rs new file mode 100644 index 0000000..16673c2 --- /dev/null +++ b/strings/strings3.rs @@ -0,0 +1,43 @@ +// strings3.rs +// +// Execute `rustlings hint strings3` or use the `hint` watch subcommand for a +// hint. + +fn trim_me(input: &str) -> String { + // TODO: Remove whitespace from both ends of a string! + input.trim().to_string() +} + +fn compose_me(input: &str) -> String { + // TODO: Add " world!" to the string! There's multiple ways to do this! + input.to_string() + " world!" +} + +fn replace_me(input: &str) -> String { + // TODO: Replace "cars" in the string with "balloons"! + input.to_string().replace("cars", "balloons") +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn trim_a_string() { + assert_eq!(trim_me("Hello! "), "Hello!"); + assert_eq!(trim_me(" What's up!"), "What's up!"); + assert_eq!(trim_me(" Hola! "), "Hola!"); + } + + #[test] + fn compose_a_string() { + assert_eq!(compose_me("Hello"), "Hello world!"); + assert_eq!(compose_me("Goodbye"), "Goodbye world!"); + } + + #[test] + fn replace_a_string() { + assert_eq!(replace_me("I think cars are cool"), "I think balloons are cool"); + assert_eq!(replace_me("I love to look at cars"), "I love to look at balloons"); + } +} diff --git a/strings/strings4.rs b/strings/strings4.rs new file mode 100644 index 0000000..9c2a0c7 --- /dev/null +++ b/strings/strings4.rs @@ -0,0 +1,28 @@ +// strings4.rs +// +// Ok, here are a bunch of values-- some are `String`s, some are `&str`s. Your +// task is to call one of these two functions on each value depending on what +// you think each value is. That is, add either `string_slice` or `string` +// before the parentheses on each line. If you're right, it will compile! +// +// No hints this time! + +fn string_slice(arg: &str) { + println!("{}", arg); +} +fn string(arg: String) { + println!("{}", arg); +} + +fn main() { + string_slice("blue"); + string("red".to_string()); + string(String::from("hi")); + string("rust is fun!".to_owned()); + string("nice weather".into()); + string(format!("Interpolation {}", "Station")); + string_slice(&String::from("abc")[0..1]); + string_slice(" hello there ".trim()); + string("Happy Monday!".to_string().replace("Mon", "Tues")); + string("mY sHiFt KeY iS sTiCkY".to_lowercase()); +} diff --git a/structs/README.md b/structs/README.md new file mode 100644 index 0000000..3fc1fdc --- /dev/null +++ b/structs/README.md @@ -0,0 +1,8 @@ +# Structs + +Rust has three struct types: a classic C struct, a tuple struct, and a unit struct. + +## Further information + +- [Structures](https://doc.rust-lang.org/book/ch05-01-defining-structs.html) +- [Method Syntax](https://doc.rust-lang.org/book/ch05-03-method-syntax.html) diff --git a/structs/structs1.rs b/structs/structs1.rs new file mode 100644 index 0000000..a5d4a57 --- /dev/null +++ b/structs/structs1.rs @@ -0,0 +1,52 @@ +// structs1.rs +// +// Address all the TODOs to make the tests pass! +// +// Execute `rustlings hint structs1` or use the `hint` watch subcommand for a +// hint. + +struct ColorClassicStruct { + red: u8, + green: u8, + blue: u8, +} + +struct ColorTupleStruct(u8, u8, u8); + +#[derive(Debug)] +struct UnitLikeStruct; + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn classic_c_structs() { + let green = ColorClassicStruct { + red: 0, + green: 255, + blue: 0, + }; + + assert_eq!(green.red, 0); + assert_eq!(green.green, 255); + assert_eq!(green.blue, 0); + } + + #[test] + fn tuple_structs() { + let green = ColorTupleStruct(0, 255, 0); + + assert_eq!(green.0, 0); + assert_eq!(green.1, 255); + assert_eq!(green.2, 0); + } + + #[test] + fn unit_structs() { + let unit_like_struct = UnitLikeStruct; + let message = format!("{:?}s are fun!", unit_like_struct); + + assert_eq!(message, "UnitLikeStructs are fun!"); + } +} diff --git a/structs/structs2.rs b/structs/structs2.rs new file mode 100644 index 0000000..8ec090f --- /dev/null +++ b/structs/structs2.rs @@ -0,0 +1,52 @@ +// structs2.rs +// +// Address all the TODOs to make the tests pass! +// +// Execute `rustlings hint structs2` or use the `hint` watch subcommand for a +// hint. + +#[derive(Debug)] +struct Order { + name: String, + year: u32, + made_by_phone: bool, + made_by_mobile: bool, + made_by_email: bool, + item_number: u32, + count: u32, +} + +fn create_order_template() -> Order { + Order { + name: String::from("Bob"), + year: 2019, + made_by_phone: false, + made_by_mobile: false, + made_by_email: true, + item_number: 123, + count: 0, + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn your_order() { + let order_template = create_order_template(); + let your_order = Order { + name: String::from("Hacker in Rust"), + count: 1, + ..order_template + + }; + assert_eq!(your_order.name, "Hacker in Rust"); + assert_eq!(your_order.year, order_template.year); + assert_eq!(your_order.made_by_phone, order_template.made_by_phone); + assert_eq!(your_order.made_by_mobile, order_template.made_by_mobile); + assert_eq!(your_order.made_by_email, order_template.made_by_email); + assert_eq!(your_order.item_number, order_template.item_number); + assert_eq!(your_order.count, 1); + } +} diff --git a/structs/structs3.rs b/structs/structs3.rs new file mode 100644 index 0000000..7ca2461 --- /dev/null +++ b/structs/structs3.rs @@ -0,0 +1,91 @@ +// structs3.rs +// +// Structs contain data, but can also have logic. In this exercise we have +// defined the Package struct and we want to test some logic attached to it. +// Make the code compile and the tests pass! +// +// Execute `rustlings hint structs3` or use the `hint` watch subcommand for a +// hint. + +#[derive(Debug)] +struct Package { + sender_country: String, + recipient_country: String, + weight_in_grams: u32, +} + +impl Package { + fn new(sender_country: String, recipient_country: String, weight_in_grams: u32) -> Package { + if weight_in_grams < 10 { + // This is not how you should handle errors in Rust, + // but we will learn about error handling later. + panic!("Can not ship a package with weight below 10 grams.") + } else { + Package { + sender_country, + recipient_country, + weight_in_grams, + } + } + } + + fn is_international(&self) -> bool { + if self.sender_country != self.recipient_country { + true + } else { + false + } + + } + + fn get_fees(&self, cents_per_gram: u32) -> u32 { + self.weight_in_grams * cents_per_gram + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + #[should_panic] + fn fail_creating_weightless_package() { + let sender_country = String::from("Spain"); + let recipient_country = String::from("Austria"); + + Package::new(sender_country, recipient_country, 5); + } + + #[test] + fn create_international_package() { + let sender_country = String::from("Spain"); + let recipient_country = String::from("Russia"); + + let package = Package::new(sender_country, recipient_country, 1200); + + assert!(package.is_international()); + } + + #[test] + fn create_local_package() { + let sender_country = String::from("Canada"); + let recipient_country = sender_country.clone(); + + let package = Package::new(sender_country, recipient_country, 1200); + + assert!(!package.is_international()); + } + + #[test] + fn calculate_transport_fees() { + let sender_country = String::from("Spain"); + let recipient_country = String::from("Spain"); + + let cents_per_gram = 3; + + let package = Package::new(sender_country, recipient_country, 1500); + + assert_eq!(package.get_fees(cents_per_gram), 4500); + assert_eq!(package.get_fees(cents_per_gram * 2), 9000); + } +} diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..27c6818 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,7 @@ +# Tests + +Going out of order from the book to cover tests -- many of the following exercises will ask you to make tests pass! + +## Further information + +- [Writing Tests](https://doc.rust-lang.org/book/ch11-01-writing-tests.html) diff --git a/tests/tests1.rs b/tests/tests1.rs new file mode 100644 index 0000000..eab3ba7 --- /dev/null +++ b/tests/tests1.rs @@ -0,0 +1,19 @@ +// tests1.rs +// +// Tests are important to ensure that your code does what you think it should +// do. Tests can be run on this file with the following command: rustlings run +// tests1 +// +// This test has a problem with it -- make the test compile! Make the test pass! +// Make the test fail! +// +// Execute `rustlings hint tests1` or use the `hint` watch subcommand for a +// hint. + +#[cfg(test)] +mod tests { + #[test] + fn you_can_assert() { + assert!(true); + } +} diff --git a/tests/tests2.rs b/tests/tests2.rs new file mode 100644 index 0000000..f74430c --- /dev/null +++ b/tests/tests2.rs @@ -0,0 +1,15 @@ +// tests2.rs +// +// This test has a problem with it -- make the test compile! Make the test pass! +// Make the test fail! +// +// Execute `rustlings hint tests2` or use the `hint` watch subcommand for a +// hint. + +#[cfg(test)] +mod tests { + #[test] + fn you_can_assert_eq() { + assert_eq!(true, true); + } +} diff --git a/tests/tests3.rs b/tests/tests3.rs new file mode 100644 index 0000000..073fb32 --- /dev/null +++ b/tests/tests3.rs @@ -0,0 +1,27 @@ +// tests3.rs +// +// This test isn't testing our function -- make it do that in such a way that +// the test passes. Then write a second test that tests whether we get the +// result we expect to get when we call `is_even(5)`. +// +// Execute `rustlings hint tests3` or use the `hint` watch subcommand for a +// hint. + +pub fn is_even(num: i32) -> bool { + num % 2 == 0 +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn is_true_when_even() { + assert!(is_even(2)); + } + + #[test] + fn is_false_when_odd() { + assert!(!is_even(5)); + } +} diff --git a/tests/tests4.rs b/tests/tests4.rs new file mode 100644 index 0000000..57dbc53 --- /dev/null +++ b/tests/tests4.rs @@ -0,0 +1,48 @@ +// tests4.rs +// +// Make sure that we're testing for the correct conditions! +// +// Execute `rustlings hint tests4` or use the `hint` watch subcommand for a +// hint. + +struct Rectangle { + width: i32, + height: i32 +} + +impl Rectangle { + // Only change the test functions themselves + pub fn new(width: i32, height: i32) -> Self { + if width <= 0 || height <= 0 { + panic!("Rectangle width and height cannot be negative!") + } + Rectangle {width, height} + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn correct_width_and_height() { + // This test should check if the rectangle is the size that we pass into its constructor + let rect = Rectangle::new(10, 20); + assert_eq!(rect.width, 10); // check width + assert_eq!(rect.height, 20); // check height + } + + #[test] + #[should_panic] + fn negative_width() { + // This test should check if program panics when we try to create rectangle with negative width + let _rect = Rectangle::new(-10, 10); + } + + #[test] + #[should_panic] + fn negative_height() { + // This test should check if program panics when we try to create rectangle with negative height + let _rect = Rectangle::new(10, -10); + } +} diff --git a/threads/README.md b/threads/README.md new file mode 100644 index 0000000..dbe6664 --- /dev/null +++ b/threads/README.md @@ -0,0 +1,9 @@ +# Threads + +In most current operating systems, an executed program's code is run in a process, and the operating system manages multiple processes at once. +Within your program, you can also have independent parts that run simultaneously. The features that run these independent parts are called threads. + +## Further information + +- [Dining Philosophers example](https://doc.rust-lang.org/1.4.0/book/dining-philosophers.html) +- [Using Threads to Run Code Simultaneously](https://doc.rust-lang.org/book/ch16-01-threads.html) diff --git a/threads/threads1.rs b/threads/threads1.rs new file mode 100644 index 0000000..a4c8985 --- /dev/null +++ b/threads/threads1.rs @@ -0,0 +1,38 @@ +// threads1.rs +// +// This program spawns multiple threads that each run for at least 250ms, and +// each thread returns how much time they took to complete. The program should +// wait until all the spawned threads have finished and should collect their +// return values into a vector. +// +// Execute `rustlings hint threads1` or use the `hint` watch subcommand for a +// hint. + +use std::thread; +use std::time::{Duration, Instant}; + +fn main() { + let mut handles = vec![]; + for i in 0..10 { + handles.push(thread::spawn(move || { + let start = Instant::now(); + thread::sleep(Duration::from_millis(250)); + println!("thread {} is complete", i); + start.elapsed().as_millis() + })); + } + + let mut results: Vec = vec![]; + for handle in handles { + results.push(handle.join().unwrap()); + } + + if results.len() != 10 { + panic!("Oh no! All the spawned threads did not finish!"); + } + + println!(); + for (i, result) in results.into_iter().enumerate() { + println!("thread {} took {}ms", i, result); + } +} diff --git a/threads/threads2.rs b/threads/threads2.rs new file mode 100644 index 0000000..ec5c61b --- /dev/null +++ b/threads/threads2.rs @@ -0,0 +1,37 @@ +// threads2.rs +// +// Building on the last exercise, we want all of the threads to complete their +// work but this time the spawned threads need to be in charge of updating a +// shared value: JobStatus.jobs_completed +// +// Execute `rustlings hint threads2` or use the `hint` watch subcommand for a +// hint. + +use std::sync::{Arc, Mutex}; +use std::thread; +use std::time::Duration; + +struct JobStatus { + jobs_completed: u32, +} + +fn main() { + let status = Arc::new(Mutex::new(JobStatus { jobs_completed: 0 })); + let mut handles = vec![]; + for _ in 0..10 { + let status_shared = Arc::clone(&status); + let handle = thread::spawn(move || { + thread::sleep(Duration::from_millis(250)); + // TODO: You must take an action before you update a shared value + status_shared.lock().unwrap().jobs_completed += 1; + }); + handles.push(handle); + } + for handle in handles { + handle.join().unwrap(); + // TODO: Print the value of the JobStatus.jobs_completed. Did you notice + // anything interesting in the output? Do you have to 'join' on all the + // handles? + println!("jobs completed {}", status.lock().unwrap().jobs_completed); + } +} diff --git a/threads/threads3.rs b/threads/threads3.rs new file mode 100644 index 0000000..2a707d9 --- /dev/null +++ b/threads/threads3.rs @@ -0,0 +1,66 @@ +// threads3.rs +// +// Execute `rustlings hint threads3` or use the `hint` watch subcommand for a +// hint. + +use std::sync::mpsc; +use std::sync::Arc; +use std::thread; +use std::time::Duration; + +struct Queue { + length: u32, + first_half: Vec, + second_half: Vec, +} + +impl Queue { + fn new() -> Self { + Queue { + length: 10, + first_half: vec![1, 2, 3, 4, 5], + second_half: vec![6, 7, 8, 9, 10], + } + } +} + +fn send_tx(q: Queue, tx: mpsc::Sender) -> () { + let qc = Arc::new(q); + let qc1 = Arc::clone(&qc); + let qc2 = Arc::clone(&qc); + let tx1 = tx.clone(); + + thread::spawn(move || { + for val in &qc1.first_half { + println!("sending {:?}", &val); + tx1.send(*val).unwrap(); + thread::sleep(Duration::from_secs(1)); + } + }); + + thread::spawn(move || { + for val in &qc2.second_half { + println!("sending {:?}", val); + tx.send(*val).unwrap(); + thread::sleep(Duration::from_secs(1)); + } + }); +} + +#[test] +fn main() { + let (tx, rx) = mpsc::channel(); + let queue = Queue::new(); + let queue_length = queue.length; + + send_tx(queue, tx); + + let mut total_received: u32 = 0; + for received in rx { + println!("Got: {}", received); + total_received += 1; + } + + println!("total numbers received: {}", total_received); + assert_eq!(total_received, queue_length) +} diff --git a/traits/README.md b/traits/README.md new file mode 100644 index 0000000..ac87c64 --- /dev/null +++ b/traits/README.md @@ -0,0 +1,19 @@ +# Traits + +A trait is a collection of methods. + +Data types can implement traits. To do so, the methods making up the trait are defined for the data type. For example, the `String` data type implements the `From<&str>` trait. This allows a user to write `String::from("hello")`. + +In this way, traits are somewhat similar to Java interfaces and C++ abstract classes. + +Some additional common Rust traits include: + +- `Clone` (the `clone` method) +- `Display` (which allows formatted display via `{}`) +- `Debug` (which allows formatted display via `{:?}`) + +Because traits indicate shared behavior between data types, they are useful when writing generics. + +## Further information + +- [Traits](https://doc.rust-lang.org/book/ch10-02-traits.html) diff --git a/traits/traits1.rs b/traits/traits1.rs new file mode 100644 index 0000000..f9bdfd2 --- /dev/null +++ b/traits/traits1.rs @@ -0,0 +1,43 @@ +// traits1.rs +// +// Time to implement some traits! Your task is to implement the trait +// `AppendBar` for the type `String`. The trait AppendBar has only one function, +// which appends "Bar" to any object implementing this trait. +// +// Execute `rustlings hint traits1` or use the `hint` watch subcommand for a +// hint. + +trait AppendBar { + fn append_bar(self) -> Self; +} + +impl AppendBar for String { + // TODO: Implement `AppendBar` for type `String`. + fn append_bar(self) -> Self { + format!("{}Bar", self) + } +} + +fn main() { + let s = String::from("Foo"); + let s = s.append_bar(); + println!("s: {}", s); +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn is_foo_bar() { + assert_eq!(String::from("Foo").append_bar(), String::from("FooBar")); + } + + #[test] + fn is_bar_bar() { + assert_eq!( + String::from("").append_bar().append_bar(), + String::from("BarBar") + ); + } +} diff --git a/traits/traits2.rs b/traits/traits2.rs new file mode 100644 index 0000000..96d661c --- /dev/null +++ b/traits/traits2.rs @@ -0,0 +1,33 @@ +// traits2.rs +// +// Your task is to implement the trait `AppendBar` for a vector of strings. To +// implement this trait, consider for a moment what it means to 'append "Bar"' +// to a vector of strings. +// +// No boiler plate code this time, you can do this! +// +// Execute `rustlings hint traits2` or use the `hint` watch subcommand for a hint. + +trait AppendBar { + fn append_bar(self) -> Self; +} + +impl AppendBar for Vec { + // TODO: Implement trait `AppendBar` for a vector of strings. + fn append_bar(mut self) -> Self { + self.push("Bar".to_string()); + self + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn is_vec_pop_eq_bar() { + let mut foo = vec![String::from("Foo")].append_bar(); + assert_eq!(foo.pop().unwrap(), String::from("Bar")); + assert_eq!(foo.pop().unwrap(), String::from("Foo")); + } +} diff --git a/traits/traits3.rs b/traits/traits3.rs new file mode 100644 index 0000000..7b75874 --- /dev/null +++ b/traits/traits3.rs @@ -0,0 +1,42 @@ +// traits3.rs +// +// Your task is to implement the Licensed trait for both structures and have +// them return the same information without writing the same function twice. +// +// Consider what you can add to the Licensed trait. +// +// Execute `rustlings hint traits3` or use the `hint` watch subcommand for a +// hint. + +pub trait Licensed { + fn licensing_info(&self) -> String { + String::from("Some information") + } +} + +struct SomeSoftware { + version_number: i32, +} + +struct OtherSoftware { + version_number: String, +} + +impl Licensed for SomeSoftware {} // Don't edit this line +impl Licensed for OtherSoftware {} // Don't edit this line + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn is_licensing_info_the_same() { + let licensing_info = String::from("Some information"); + let some_software = SomeSoftware { version_number: 1 }; + let other_software = OtherSoftware { + version_number: "v2.0.0".to_string(), + }; + assert_eq!(some_software.licensing_info(), licensing_info); + assert_eq!(other_software.licensing_info(), licensing_info); + } +} diff --git a/traits/traits4.rs b/traits/traits4.rs new file mode 100644 index 0000000..4f3e19d --- /dev/null +++ b/traits/traits4.rs @@ -0,0 +1,47 @@ +// traits4.rs +// +// Your task is to replace the '??' sections so the code compiles. +// +// Don't change any line other than the marked one. +// +// Execute `rustlings hint traits4` or use the `hint` watch subcommand for a +// hint. + +pub trait Licensed { + fn licensing_info(&self) -> String { + "some information".to_string() + } +} + +struct SomeSoftware {} + +struct OtherSoftware {} + +impl Licensed for SomeSoftware {} +impl Licensed for OtherSoftware {} + +// YOU MAY ONLY CHANGE THE NEXT LINE +fn compare_license_types(software: impl Licensed, software_two: impl Licensed) -> bool { + software.licensing_info() == software_two.licensing_info() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn compare_license_information() { + let some_software = SomeSoftware {}; + let other_software = OtherSoftware {}; + + assert!(compare_license_types(some_software, other_software)); + } + + #[test] + fn compare_license_information_backwards() { + let some_software = SomeSoftware {}; + let other_software = OtherSoftware {}; + + assert!(compare_license_types(other_software, some_software)); + } +} diff --git a/traits/traits5.rs b/traits/traits5.rs new file mode 100644 index 0000000..07bb206 --- /dev/null +++ b/traits/traits5.rs @@ -0,0 +1,38 @@ +// traits5.rs +// +// Your task is to replace the '??' sections so the code compiles. +// +// Don't change any line other than the marked one. +// +// Execute `rustlings hint traits5` or use the `hint` watch subcommand for a +// hint. + +pub trait SomeTrait { + fn some_function(&self) -> bool { + true + } +} + +pub trait OtherTrait { + fn other_function(&self) -> bool { + true + } +} + +struct SomeStruct {} +struct OtherStruct {} + +impl SomeTrait for SomeStruct {} +impl OtherTrait for SomeStruct {} +impl SomeTrait for OtherStruct {} +impl OtherTrait for OtherStruct {} + +// YOU MAY ONLY CHANGE THE NEXT LINE +fn some_func(item: impl SomeTrait + OtherTrait) -> bool { + item.some_function() && item.other_function() +} + +fn main() { + some_func(SomeStruct {}); + some_func(OtherStruct {}); +} diff --git a/variables/README.md b/variables/README.md new file mode 100644 index 0000000..7964ff2 --- /dev/null +++ b/variables/README.md @@ -0,0 +1,9 @@ +# Variables + +In Rust, variables are immutable by default. +When a variable is immutable, once a value is bound to a name, you can’t change that value. +You can make them mutable by adding `mut` in front of the variable name. + +## Further information + +- [Variables and Mutability](https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html) diff --git a/variables/variables1.rs b/variables/variables1.rs new file mode 100644 index 0000000..469fd4e --- /dev/null +++ b/variables/variables1.rs @@ -0,0 +1,12 @@ +// variables1.rs +// +// Make me compile! +// +// Execute `rustlings hint variables1` or use the `hint` watch subcommand for a +// hint. + + +fn main() { + let x = 5; + println!("x has the value {}", x); +} diff --git a/variables/variables2.rs b/variables/variables2.rs new file mode 100644 index 0000000..6e666cc --- /dev/null +++ b/variables/variables2.rs @@ -0,0 +1,14 @@ +// variables2.rs +// +// Execute `rustlings hint variables2` or use the `hint` watch subcommand for a +// hint. + + +fn main() { + let x = 3; + if x == 10 { + println!("x is ten!"); + } else { + println!("x is not ten!"); + } +} diff --git a/variables/variables3.rs b/variables/variables3.rs new file mode 100644 index 0000000..fbe6aad --- /dev/null +++ b/variables/variables3.rs @@ -0,0 +1,10 @@ +// variables3.rs +// +// Execute `rustlings hint variables3` or use the `hint` watch subcommand for a +// hint. + + +fn main() { + let x: i32 = 7; + println!("Number {}", x); +} diff --git a/variables/variables4.rs b/variables/variables4.rs new file mode 100644 index 0000000..c75843e --- /dev/null +++ b/variables/variables4.rs @@ -0,0 +1,11 @@ +// variables4.rs +// +// Execute `rustlings hint variables4` or use the `hint` watch subcommand for a +// hint. + +fn main() { + let mut x = 3; + println!("Number {}", x); + x = 5; // don't change this line + println!("Number {}", x); +} diff --git a/variables/variables5.rs b/variables/variables5.rs new file mode 100644 index 0000000..19ce9d6 --- /dev/null +++ b/variables/variables5.rs @@ -0,0 +1,11 @@ +// variables5.rs +// +// Execute `rustlings hint variables5` or use the `hint` watch subcommand for a +// hint. + +fn main() { + let number = "T-H-R-E-E"; // don't change this line + println!("Spell a Number : {}", number); + let number = 3; // don't rename this variable + println!("Number plus two is : {}", number + 2); +} diff --git a/variables/variables6.rs b/variables/variables6.rs new file mode 100644 index 0000000..0b69e92 --- /dev/null +++ b/variables/variables6.rs @@ -0,0 +1,9 @@ +// variables6.rs +// +// Execute `rustlings hint variables6` or use the `hint` watch subcommand for a +// hint. + +const NUMBER: u8 = 3; +fn main() { + println!("Number {}", NUMBER); +} diff --git a/vecs/README.md b/vecs/README.md new file mode 100644 index 0000000..8ff9b85 --- /dev/null +++ b/vecs/README.md @@ -0,0 +1,17 @@ +# Vectors + +Vectors are one of the most-used Rust data structures. In other programming +languages, they'd simply be called Arrays, but since Rust operates on a +bit of a lower level, an array in Rust is stored on the stack (meaning it +can't grow or shrink, and the size needs to be known at compile time), +and a Vector is stored in the heap (where these restrictions do not apply). + +Vectors are a bit of a later chapter in the book, but we think that they're +useful enough to talk about them a bit earlier. We shall be talking about +the other useful data structure, hash maps, later. + +## Further information + +- [Storing Lists of Values with Vectors](https://doc.rust-lang.org/stable/book/ch08-01-vectors.html) +- [`iter_mut`](https://doc.rust-lang.org/std/primitive.slice.html#method.iter_mut) +- [`map`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.map) diff --git a/vecs/vecs1.rs b/vecs/vecs1.rs new file mode 100644 index 0000000..21a0534 --- /dev/null +++ b/vecs/vecs1.rs @@ -0,0 +1,26 @@ +// vecs1.rs +// +// Your task is to create a `Vec` which holds the exact same elements as in the +// array `a`. +// +// Make me compile and pass the test! +// +// Execute `rustlings hint vecs1` or use the `hint` watch subcommand for a hint. + +fn array_and_vec() -> ([i32; 4], Vec) { + let a = [10, 20, 30, 40]; // a plain array + let v = vec![10, 20, 30, 40]; + + (a, v) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_array_and_vec_similarity() { + let (a, v) = array_and_vec(); + assert_eq!(a, v[..]); + } +} diff --git a/vecs/vecs2.rs b/vecs/vecs2.rs new file mode 100644 index 0000000..7214514 --- /dev/null +++ b/vecs/vecs2.rs @@ -0,0 +1,42 @@ +// vecs2.rs +// +// A Vec of even numbers is given. Your task is to complete the loop so that +// each number in the Vec is multiplied by 2. +// +// Make me pass the test! +// +// Execute `rustlings hint vecs2` or use the `hint` watch subcommand for a hint. + +fn vec_loop(mut v: Vec) -> Vec { + for element in v.iter_mut() { + *element *= 2; + } + + // At this point, `v` should be equal to [4, 8, 12, 16, 20]. + v +} + +fn vec_map(v: &Vec) -> Vec { + v.iter().map(|element| element * 2).collect() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_vec_loop() { + let v: Vec = (1..).filter(|x| x % 2 == 0).take(5).collect(); + let ans = vec_loop(v.clone()); + + assert_eq!(ans, v.iter().map(|x| x * 2).collect::>()); + } + + #[test] + fn test_vec_map() { + let v: Vec = (1..).filter(|x| x % 2 == 0).take(5).collect(); + let ans = vec_map(&v); + + assert_eq!(ans, v.iter().map(|x| x * 2).collect::>()); + } +}