mirror of https://github.com/01-edu/public.git
adding dependencies
This commit is contained in:
parent
cfd12734d3
commit
6ba324f2f2
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "adding"
|
||||
name = "adding_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "adding_twice"
|
||||
name = "adding_twice_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -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",
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "diamond_creation"
|
||||
name = "diamond_creation_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "get_products"
|
||||
name = "get_products_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "highest"
|
||||
name = "highest_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "even_iterator"
|
||||
name = "iterators_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "logic-number"
|
||||
name = "logic_number_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "ordinal"
|
||||
name = "ordinal_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "panaram"
|
||||
name = "pangram_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "pig_latin"
|
||||
name = "pig_latin_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "rgb_match"
|
||||
name = "rgb_match_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "rot"
|
||||
name = "rot_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "scrabble"
|
||||
name = "scores_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "searching"
|
||||
name = "searching_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "simple-hash_test"
|
||||
name = "simple_hash_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
edition = "2018"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "spelling"
|
||||
name = "spelling_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"
|
||||
rand = "0.7"
|
||||
spelling = { path = "../../../../rust-piscine-solutions/spelling"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "stars"
|
||||
name = "stars_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "talking"
|
||||
name = "talking_test"
|
||||
version = "0.1.0"
|
||||
authors = ["MSilva95 <miguel-silva98@hotmail.com>"]
|
||||
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"}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<T>(F: _) -> _{}
|
||||
pub fn twice<T>(F: _) -> _{}
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
@ -24,6 +24,8 @@ fn twice<T>(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);
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -22,7 +22,7 @@ Rules:
|
|||
### Expected functions
|
||||
|
||||
```rust
|
||||
fn get_diamond(c: char) -> Vec<String> {}
|
||||
pub fn get_diamond(c: char) -> Vec<String> {}
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
@ -30,6 +30,8 @@ fn get_diamond(c: char) -> Vec<String> {}
|
|||
Here is a program to test your function.
|
||||
|
||||
```rust
|
||||
use diamond_creation::diamond_creation;
|
||||
|
||||
fn main() {
|
||||
println!("{:?}", make_diamond('A'));
|
||||
println!("{:?}", make_diamond('C'));
|
||||
|
|
|
@ -13,7 +13,7 @@ except the current one.
|
|||
### Expected functions
|
||||
|
||||
```rust
|
||||
fn get_products(arr: Vec<usize>) -> Vec<usize> {}
|
||||
pub fn get_products(arr: Vec<usize>) -> Vec<usize> {}
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
@ -21,6 +21,8 @@ fn get_products(arr: Vec<usize>) -> Vec<usize> {}
|
|||
Here is a program to test your function.
|
||||
|
||||
```rust
|
||||
use get_products::get_products;
|
||||
|
||||
fn main() {
|
||||
let arr: Vec<usize> = vec![1, 7, 3, 4];
|
||||
let output = get_products(arr);
|
||||
|
|
|
@ -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<u32> {}
|
||||
pub fn Latest(&self) -> Option<u32> {}
|
||||
|
||||
fn Highest(&self) -> Option<u32> {}
|
||||
pub fn Highest(&self) -> Option<u32> {}
|
||||
|
||||
fn Highest_Three(&self) -> Vec<u32> {}
|
||||
pub fn Highest_Three(&self) -> Vec<u32> {}
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
@ -32,6 +32,8 @@ fn Highest_Three(&self) -> Vec<u32> {}
|
|||
Here is a program to test your function.
|
||||
|
||||
```rust
|
||||
use highest::highest;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct Numbers<'a> {
|
||||
numbers: &'a [u32],
|
||||
|
|
|
@ -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<Self::Item> {}
|
||||
pub fn next(&mut self) -> Option<Self::Item> {}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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!(
|
||||
"{}",
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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("ã ê Á?"));
|
||||
|
|
|
@ -13,7 +13,7 @@ of the given key in the array.
|
|||
### Expected functions
|
||||
|
||||
```rust
|
||||
fn search(array: &[i32], key: i32) -> Option<usize> {}
|
||||
pub fn search(array: &[i32], key: i32) -> Option<usize> {}
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
@ -21,6 +21,8 @@ fn search(array: &[i32], key: i32) -> Option<usize> {}
|
|||
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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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?"));
|
||||
|
|
Loading…
Reference in New Issue