diff --git a/rust/tests/adding_test/Cargo.toml b/rust/tests/adding_test/Cargo.toml index 590a6cf0..9fd50d5a 100644 --- a/rust/tests/adding_test/Cargo.toml +++ b/rust/tests/adding_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "adding" +name = "adding_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +adding = { path = "../../../../rust-piscine-solutions/adding"} diff --git a/rust/tests/adding_twice_test/Cargo.toml b/rust/tests/adding_twice_test/Cargo.toml index b06266c3..ae6e76ce 100644 --- a/rust/tests/adding_twice_test/Cargo.toml +++ b/rust/tests/adding_twice_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "adding_twice" +name = "adding_twice_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +adding_twice = { path = "../../../../rust-piscine-solutions/adding_twice"} diff --git a/rust/tests/changes_test/Cargo.lock b/rust/tests/changes_test/Cargo.lock index 6fc2f7c1..9527a5d7 100644 --- a/rust/tests/changes_test/Cargo.lock +++ b/rust/tests/changes_test/Cargo.lock @@ -1,24 +1,8 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -[[package]] -name = "assert_cmd" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dc1679af9a1ab4bea16f228b05d18f8363f8327b1fa8db00d2760cfafc6b61e" -dependencies = [ - "doc-comment", - "predicates", - "predicates-core", - "predicates-tree", - "wait-timeout", -] - [[package]] name = "changes" version = "0.1.0" -dependencies = [ - "assert_cmd", -] [[package]] name = "changes_test" @@ -26,62 +10,3 @@ version = "0.1.0" dependencies = [ "changes", ] - -[[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" - -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - -[[package]] -name = "libc" -version = "0.2.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" - -[[package]] -name = "predicates" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bfead12e90dccead362d62bb2c90a5f6fc4584963645bc7f71a735e0b0735a" -dependencies = [ - "difference", - "predicates-core", -] - -[[package]] -name = "predicates-core" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" - -[[package]] -name = "predicates-tree" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" -dependencies = [ - "predicates-core", - "treeline", -] - -[[package]] -name = "treeline" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" - -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] diff --git a/rust/tests/diamond_creation_test/Cargo.toml b/rust/tests/diamond_creation_test/Cargo.toml index d0d34d04..705e4781 100644 --- a/rust/tests/diamond_creation_test/Cargo.toml +++ b/rust/tests/diamond_creation_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "diamond_creation" +name = "diamond_creation_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +diamond_creation = { path = "../../../../rust-piscine-solutions/diamond_creation"} diff --git a/rust/tests/get_products_test/Cargo.toml b/rust/tests/get_products_test/Cargo.toml index 68f5d5c6..b40fbeb0 100644 --- a/rust/tests/get_products_test/Cargo.toml +++ b/rust/tests/get_products_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "get_products" +name = "get_products_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +get_products = { path = "../../../../rust-piscine-solutions/ge"} diff --git a/rust/tests/highest_test/Cargo.toml b/rust/tests/highest_test/Cargo.toml index 55a6c550..e05f0d88 100644 --- a/rust/tests/highest_test/Cargo.toml +++ b/rust/tests/highest_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "highest" +name = "highest_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +highest = { path = "../../../../rust-piscine-solutions/highest"} diff --git a/rust/tests/iterators_test/Cargo.toml b/rust/tests/iterators_test/Cargo.toml index 1e66e912..dd7616c5 100644 --- a/rust/tests/iterators_test/Cargo.toml +++ b/rust/tests/iterators_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "even_iterator" +name = "iterators_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +iterators = { path = "../../../../rust-piscine-solutions/iterators"} diff --git a/rust/tests/logic_number_test/Cargo.toml b/rust/tests/logic_number_test/Cargo.toml index a28f0b50..f4ea4533 100644 --- a/rust/tests/logic_number_test/Cargo.toml +++ b/rust/tests/logic_number_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "logic-number" +name = "logic_number_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +logic_number = { path = "../../../../rust-piscine-solutions/logic_number"} diff --git a/rust/tests/ordinal_test/Cargo.toml b/rust/tests/ordinal_test/Cargo.toml index 01da4c4c..4caa56df 100644 --- a/rust/tests/ordinal_test/Cargo.toml +++ b/rust/tests/ordinal_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ordinal" +name = "ordinal_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +ordinal = { path = "../../../../rust-piscine-solutions/ordinal"} diff --git a/rust/tests/pangram_test/Cargo.toml b/rust/tests/pangram_test/Cargo.toml index d750b421..c3871005 100644 --- a/rust/tests/pangram_test/Cargo.toml +++ b/rust/tests/pangram_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "panaram" +name = "pangram_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +pangram = { path = "../../../../rust-piscine-solutions/pangram"} diff --git a/rust/tests/pig_latin_test/Cargo.toml b/rust/tests/pig_latin_test/Cargo.toml index 4fc3d58b..51dffa34 100644 --- a/rust/tests/pig_latin_test/Cargo.toml +++ b/rust/tests/pig_latin_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pig_latin" +name = "pig_latin_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +pig_latin = { path = "../../../../rust-piscine-solutions/pig_latin"} diff --git a/rust/tests/rgb_match_test/Cargo.toml b/rust/tests/rgb_match_test/Cargo.toml index e0bd43d6..651a5fb2 100644 --- a/rust/tests/rgb_match_test/Cargo.toml +++ b/rust/tests/rgb_match_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rgb_match" +name = "rgb_match_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +rgb_match = { path = "../../../../rust-piscine-solutions/rgb_match"} diff --git a/rust/tests/rot_test/Cargo.toml b/rust/tests/rot_test/Cargo.toml index 675a71a6..99ffa741 100644 --- a/rust/tests/rot_test/Cargo.toml +++ b/rust/tests/rot_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rot" +name = "rot_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +rot = { path = "../../../../rust-piscine-solutions/rot"} diff --git a/rust/tests/scores_test/Cargo.toml b/rust/tests/scores_test/Cargo.toml index 6b7e6b9c..9309ecc7 100644 --- a/rust/tests/scores_test/Cargo.toml +++ b/rust/tests/scores_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "scrabble" +name = "scores_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +scores = { path = "../../../../rust-piscine-solutions/scores"} diff --git a/rust/tests/searching_test/Cargo.toml b/rust/tests/searching_test/Cargo.toml index 659bd082..74ad5bb6 100644 --- a/rust/tests/searching_test/Cargo.toml +++ b/rust/tests/searching_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "searching" +name = "searching_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +searching = { path = "../../../../rust-piscine-solutions/searching"} diff --git a/rust/tests/simple_hash_test/Cargo.toml b/rust/tests/simple_hash_test/Cargo.toml index b4470131..b6765339 100644 --- a/rust/tests/simple_hash_test/Cargo.toml +++ b/rust/tests/simple_hash_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "simple-hash_test" +name = "simple_hash_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" diff --git a/rust/tests/spelling_test/Cargo.toml b/rust/tests/spelling_test/Cargo.toml index 1a2286bd..fd2fe408 100644 --- a/rust/tests/spelling_test/Cargo.toml +++ b/rust/tests/spelling_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "spelling" +name = "spelling_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,4 +7,5 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -rand = "0.7" \ No newline at end of file +rand = "0.7" +spelling = { path = "../../../../rust-piscine-solutions/spelling"} diff --git a/rust/tests/stars_test/Cargo.toml b/rust/tests/stars_test/Cargo.toml index 5881ed6f..ac7bd8a3 100644 --- a/rust/tests/stars_test/Cargo.toml +++ b/rust/tests/stars_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "stars" +name = "stars_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +stars = { path = "../../../../rust-piscine-solutions/stars"} diff --git a/rust/tests/talking_test/Cargo.toml b/rust/tests/talking_test/Cargo.toml index 07c8e169..32fbc845 100644 --- a/rust/tests/talking_test/Cargo.toml +++ b/rust/tests/talking_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "talking" +name = "talking_test" version = "0.1.0" authors = ["MSilva95 "] edition = "2018" @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +talking = { path = "../../../../rust-piscine-solutions/talking"} diff --git a/subjects/adding/README.md b/subjects/adding/README.md index e6cb61f3..f462eea6 100644 --- a/subjects/adding/README.md +++ b/subjects/adding/README.md @@ -10,6 +10,8 @@ The purpose is to curry the add method to create more variations. Here is a program to test your function. ```rust +use adding::adding; + fn main() { let add10 = add_curry(-10); let add20 = add_curry(2066); diff --git a/subjects/adding_twice/README.md b/subjects/adding_twice/README.md index 04dc18cf..24ce8d13 100644 --- a/subjects/adding_twice/README.md +++ b/subjects/adding_twice/README.md @@ -16,7 +16,7 @@ So, the purpose of this function is to add two times the value in `add_curry` to The type of the arguments are missing use the example `main` function to determine the correct type. ```rust -fn twice(F: _) -> _{} +pub fn twice(F: _) -> _{} ``` ### Usage @@ -24,6 +24,8 @@ fn twice(F: _) -> _{} Here is a program to test your function. ```rust +use adding_twice::adding_twice; + fn main() { let add10 = add_curry(10); let value = twice(add10); diff --git a/subjects/capitalizing/README.md b/subjects/capitalizing/README.md index 4490c1dd..34ad3196 100644 --- a/subjects/capitalizing/README.md +++ b/subjects/capitalizing/README.md @@ -26,6 +26,8 @@ pub fn change_case(input: &str) -> String { Here is a program to test your function. ```rust +use capitalizing::capitalizing; + fn main() { println!("{}", capitalize_first("joe is missing")); println!("{}", title_case("jill is leaving A")); diff --git a/subjects/diamond_creation/README.md b/subjects/diamond_creation/README.md index 5440524a..25684840 100644 --- a/subjects/diamond_creation/README.md +++ b/subjects/diamond_creation/README.md @@ -22,7 +22,7 @@ Rules: ### Expected functions ```rust -fn get_diamond(c: char) -> Vec {} +pub fn get_diamond(c: char) -> Vec {} ``` ### Usage @@ -30,6 +30,8 @@ fn get_diamond(c: char) -> Vec {} Here is a program to test your function. ```rust +use diamond_creation::diamond_creation; + fn main() { println!("{:?}", make_diamond('A')); println!("{:?}", make_diamond('C')); diff --git a/subjects/get_products/README.md b/subjects/get_products/README.md index b1eee2e6..dbb694f7 100644 --- a/subjects/get_products/README.md +++ b/subjects/get_products/README.md @@ -13,7 +13,7 @@ except the current one. ### Expected functions ```rust -fn get_products(arr: Vec) -> Vec {} +pub fn get_products(arr: Vec) -> Vec {} ``` ### Usage @@ -21,6 +21,8 @@ fn get_products(arr: Vec) -> Vec {} Here is a program to test your function. ```rust +use get_products::get_products; + fn main() { let arr: Vec = vec![1, 7, 3, 4]; let output = get_products(arr); diff --git a/subjects/highest/README.md b/subjects/highest/README.md index 2f1e2773..428bf047 100644 --- a/subjects/highest/README.md +++ b/subjects/highest/README.md @@ -18,13 +18,13 @@ Your task is to write these methods: ### Expected functions ```rust -fn List(&self) -> &[u32] {} +pub fn List(&self) -> &[u32] {} -fn Latest(&self) -> Option {} +pub fn Latest(&self) -> Option {} -fn Highest(&self) -> Option {} +pub fn Highest(&self) -> Option {} -fn Highest_Three(&self) -> Vec {} +pub fn Highest_Three(&self) -> Vec {} ``` ### Usage @@ -32,6 +32,8 @@ fn Highest_Three(&self) -> Vec {} Here is a program to test your function. ```rust +use highest::highest; + #[derive(Debug)] struct Numbers<'a> { numbers: &'a [u32], diff --git a/subjects/iterators/README.md b/subjects/iterators/README.md index 070dcc83..0b58cc7e 100644 --- a/subjects/iterators/README.md +++ b/subjects/iterators/README.md @@ -21,11 +21,11 @@ So the purpose is to return the given number in the right position, if it is eve ```rust impl Number { -fn new(nbr: usize) -> Number {} + pub fn new(nbr: usize) -> Number {} } impl Iterator for Number { - fn next(&mut self) -> Option {} + pub fn next(&mut self) -> Option {} } ``` @@ -34,6 +34,8 @@ impl Iterator for Number { Here is a program to test your function. ```rust +use iterators::iterators; + struct Number { even: usize, odd: usize, diff --git a/subjects/logic_number/README.md b/subjects/logic_number/README.md index d3f2b79f..20ab1f5f 100644 --- a/subjects/logic_number/README.md +++ b/subjects/logic_number/README.md @@ -29,6 +29,8 @@ pub fn number_logic(num: u32) -> bool {} Here is a program to test your function. ```rust +use logic_number::logic_number; + fn main() { let array = [9, 10, 153, 154]; for pat in &array { diff --git a/subjects/ordinal/README.md b/subjects/ordinal/README.md index 1e0cdbf7..40cedd78 100644 --- a/subjects/ordinal/README.md +++ b/subjects/ordinal/README.md @@ -7,7 +7,7 @@ Complete the function "num_to_ordinal" that receives a cardinal number and retur ### Expected functions ```rust -fn num_to_ordinal(x: u32) -> String {} +pub fn num_to_ordinal(x: u32) -> String {} ``` ### Usage @@ -15,6 +15,8 @@ fn num_to_ordinal(x: u32) -> String {} Here is a program to test your function. ```rust +use ordinal::ordinal; + fn main() { println!("{}", num_to_ordinal(1)); println!("{}", num_to_ordinal(22)); diff --git a/subjects/pangram/README.md b/subjects/pangram/README.md index 01c4cf02..dbe6005d 100644 --- a/subjects/pangram/README.md +++ b/subjects/pangram/README.md @@ -17,7 +17,7 @@ Example: ### Expected functions ```rust -fn is_pangram(s: &str) -> bool {} +pub fn is_pangram(s: &str) -> bool {} ``` ### Usage @@ -25,6 +25,8 @@ fn is_pangram(s: &str) -> bool {} Here is a program to test your function. ```rust +use pangram::pangram; + fn main() { println!( "{}", diff --git a/subjects/pig_latin/README.md b/subjects/pig_latin/README.md index 18ee5d23..dae63458 100644 --- a/subjects/pig_latin/README.md +++ b/subjects/pig_latin/README.md @@ -25,6 +25,8 @@ pub fn pig_latin(text: &str) -> String {} Here is a program to test your function. ```rust +use pig_latin::pig_latin; + fn main() { println!("{}", pig_latin(&String::from("igloo"))); println!("{}", pig_latin(&String::from("apple"))); diff --git a/subjects/rgb_match/README.md b/subjects/rgb_match/README.md index a4e21c81..74f2035d 100644 --- a/subjects/rgb_match/README.md +++ b/subjects/rgb_match/README.md @@ -13,7 +13,7 @@ This function must allow you to swap the values of the struct. ```rust impl Color { - fn swap(mut self, first: u8, second: u8) -> Color {} + pub fn swap(mut self, first: u8, second: u8) -> Color {} } ``` @@ -22,6 +22,8 @@ impl Color { Here is a program to test your function. ```rust +use rgb_match::rgb_match; + struct Color { r: u8, g: u8, diff --git a/subjects/rot/README.md b/subjects/rot/README.md index 5db1a0a3..7f544344 100644 --- a/subjects/rot/README.md +++ b/subjects/rot/README.md @@ -11,7 +11,8 @@ A ROT13 on the Latin alphabet would be as follows: - Cipher: nopqrstuvwxyzabcdefghijklm Your purpose in this exercise is to create a similar `rot` function that is a better version of the ROT13 cipher. -Your function will receive a string and a number and it will rotate each letter of that string, the number of times, settled by the second argument, to the right or to the left if the number are negative. + +Your function will receive a string and a number and it will rotate each letter of that string the number of times settled by the second argument to the right, or to the left if the number are negative. Your function should only change letters. If the string includes punctuation and numbers they will remain the same. @@ -23,7 +24,7 @@ they will remain the same. ### Expected functions ```rust - +pub fn rot(input: &str, key: i8) -> String {} ``` ### Usage @@ -31,6 +32,8 @@ they will remain the same. Here is a program to test your function. ```rust +use rot::rot; + fn main() { println!("The letter \"a\" becomes: {}", rot("a", 26)); diff --git a/subjects/scores/README.md b/subjects/scores/README.md index e39cbca0..e12654c1 100644 --- a/subjects/scores/README.md +++ b/subjects/scores/README.md @@ -27,7 +27,7 @@ You'll need these: ### Expected functions ```rust -fn score(word: &str) -> u64 {} +pub fn score(word: &str) -> u64 {} ``` ### Usage @@ -35,6 +35,8 @@ fn score(word: &str) -> u64 {} Here is a program to test your function. ```rust +use scores::scores; + fn main() { println!("{}", score("a")); println!("{}", score("ã ê Á?")); diff --git a/subjects/searching/README.md b/subjects/searching/README.md index 0e315720..40a15b7c 100644 --- a/subjects/searching/README.md +++ b/subjects/searching/README.md @@ -13,7 +13,7 @@ of the given key in the array. ### Expected functions ```rust -fn search(array: &[i32], key: i32) -> Option {} +pub fn search(array: &[i32], key: i32) -> Option {} ``` ### Usage @@ -21,6 +21,8 @@ fn search(array: &[i32], key: i32) -> Option {} Here is a program to test your function. ```rust +use searching::searching; + fn main() { let ar = [1, 3, 4, 6, 8, 9, 11]; let f = search(&ar, 6); diff --git a/subjects/simple_hash/README.md b/subjects/simple_hash/README.md index 15de390b..a90c4c1f 100644 --- a/subjects/simple_hash/README.md +++ b/subjects/simple_hash/README.md @@ -23,6 +23,7 @@ pub fn remove(h: &mut HashMap<&str, i32>, s: &str) {} Here is a program to test your function. ```rust +use simple_hash::simple_hash; use std::collections::HashMap; fn main() { diff --git a/subjects/spelling/README.md b/subjects/spelling/README.md index 34d25ca8..d5992d49 100644 --- a/subjects/spelling/README.md +++ b/subjects/spelling/README.md @@ -31,6 +31,8 @@ pub fn spell(n: u64) -> String {} Here is a program to test your function. ```rust +use spelling::spelling; + fn main() { println!("{}", spell(348)); println!("{}", spell(9996)); diff --git a/subjects/stars/README.md b/subjects/stars/README.md index bedda616..86ae66d5 100644 --- a/subjects/stars/README.md +++ b/subjects/stars/README.md @@ -8,7 +8,7 @@ parameter and returns a string of stars (asterisks) 2^n long (2 to the nth power ### Expected functions ```rust -fn stars(n: u32) -> String {} +pub fn stars(n: u32) -> String {} ``` ### Usage @@ -16,6 +16,8 @@ fn stars(n: u32) -> String {} Here is a program to test your function. ```rust +use stars::stars; + fn main() { println!("{}", stars(1)); println!("{}", stars(4)); diff --git a/subjects/talking/README.md b/subjects/talking/README.md index 330fcd6f..129c6482 100644 --- a/subjects/talking/README.md +++ b/subjects/talking/README.md @@ -20,7 +20,7 @@ His answers will be created by you following the rules below. ### Expected functions ```rust -fn talking(text: &str) -> &str {} +pub fn talking(text: &str) -> &str {} ``` ### Usage @@ -28,6 +28,8 @@ fn talking(text: &str) -> &str {} Here is a program to test your function. ```rust +use talking::talking; + fn main() { println!("{:?}", talking("JUST DO IT!")); println!("{:?}", talking("Hello how are you?"));