Browse Source

adding dependencies

content-update
MSilva95 3 years ago
parent
commit
6ba324f2f2
  1. 3
      rust/tests/adding_test/Cargo.toml
  2. 3
      rust/tests/adding_twice_test/Cargo.toml
  3. 75
      rust/tests/changes_test/Cargo.lock
  4. 3
      rust/tests/diamond_creation_test/Cargo.toml
  5. 3
      rust/tests/get_products_test/Cargo.toml
  6. 3
      rust/tests/highest_test/Cargo.toml
  7. 3
      rust/tests/iterators_test/Cargo.toml
  8. 3
      rust/tests/logic_number_test/Cargo.toml
  9. 3
      rust/tests/ordinal_test/Cargo.toml
  10. 3
      rust/tests/pangram_test/Cargo.toml
  11. 3
      rust/tests/pig_latin_test/Cargo.toml
  12. 3
      rust/tests/rgb_match_test/Cargo.toml
  13. 3
      rust/tests/rot_test/Cargo.toml
  14. 3
      rust/tests/scores_test/Cargo.toml
  15. 3
      rust/tests/searching_test/Cargo.toml
  16. 2
      rust/tests/simple_hash_test/Cargo.toml
  17. 5
      rust/tests/spelling_test/Cargo.toml
  18. 3
      rust/tests/stars_test/Cargo.toml
  19. 3
      rust/tests/talking_test/Cargo.toml
  20. 2
      subjects/adding/README.md
  21. 4
      subjects/adding_twice/README.md
  22. 2
      subjects/capitalizing/README.md
  23. 4
      subjects/diamond_creation/README.md
  24. 4
      subjects/get_products/README.md
  25. 10
      subjects/highest/README.md
  26. 6
      subjects/iterators/README.md
  27. 2
      subjects/logic_number/README.md
  28. 4
      subjects/ordinal/README.md
  29. 4
      subjects/pangram/README.md
  30. 2
      subjects/pig_latin/README.md
  31. 4
      subjects/rgb_match/README.md
  32. 7
      subjects/rot/README.md
  33. 4
      subjects/scores/README.md
  34. 4
      subjects/searching/README.md
  35. 1
      subjects/simple_hash/README.md
  36. 2
      subjects/spelling/README.md
  37. 4
      subjects/stars/README.md
  38. 4
      subjects/talking/README.md

3
rust/tests/adding_test/Cargo.toml

@ -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"}

3
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 <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"}

75
rust/tests/changes_test/Cargo.lock diff.generated

@ -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",
]

3
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 <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"}

3
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 <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"}

3
rust/tests/highest_test/Cargo.toml

@ -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"}

3
rust/tests/iterators_test/Cargo.toml

@ -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"}

3
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 <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"}

3
rust/tests/ordinal_test/Cargo.toml

@ -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"}

3
rust/tests/pangram_test/Cargo.toml

@ -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"}

3
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 <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"}

3
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 <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"}

3
rust/tests/rot_test/Cargo.toml

@ -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"}

3
rust/tests/scores_test/Cargo.toml

@ -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"}

3
rust/tests/searching_test/Cargo.toml

@ -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"}

2
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 <miguel-silva98@hotmail.com>"]
edition = "2018"

5
rust/tests/spelling_test/Cargo.toml

@ -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"}

3
rust/tests/stars_test/Cargo.toml

@ -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"}

3
rust/tests/talking_test/Cargo.toml

@ -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"}

2
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);

4
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<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);

2
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"));

4
subjects/diamond_creation/README.md

@ -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'));

4
subjects/get_products/README.md

@ -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);

10
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<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],

6
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<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,

2
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 {

4
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));

4
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!(
"{}",

2
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")));

4
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,

7
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));

4
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("ã ê Á?"));

4
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<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);

1
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() {

2
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));

4
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));

4
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?"));

Loading…
Cancel
Save