Skip to content

Commit

Permalink
fix(quest-02): made prettier compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Ferreira committed Dec 11, 2024
1 parent 42c2b65 commit d4f960c
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions subjects/arrange_it/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
Create a **function** named `arrange_phrase`, that takes a string literal, _sorts_ the words and returns it. Each word will contain a number that indicates the position of that word.

### Expected Functions

```rust
pub fn arrange_phrase(phrase: &str) -> String {
}
```

> Your heap allocations will be monitored to ensure that you do not make too many allocations, and that your allocations are reasonably sized.


### Usage

Here is a program to test your function
Expand Down
1 change: 1 addition & 0 deletions subjects/borrow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create a **function** named `str_len`, you'll need to complete the function signature. Your function should accept a borrowed string, and return its length (in characters).

### Expected functions

```rust
pub fn str_len(s: ) -> usize {
}
Expand Down
1 change: 1 addition & 0 deletions subjects/copy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Create the following **functions**. The objective is to know how ownership works
- and the `natural logarithm` of each `absolute` value.

### Expected functions

```rust
pub fn nbr_function(c: i32) -> (i32, f64, f64) {
}
Expand Down
1 change: 1 addition & 0 deletions subjects/doubtful/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create a function named `doubtful` which appends a question mark to every string passed to it. It must not return a value.

### Expected functions

```rust
pub fn doubtful(s: /*give the correct type*/ ) {
}
Expand Down
2 changes: 1 addition & 1 deletion subjects/name_initials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
Create a **function** named `initials`. This function will receive a vector of string literals with names, and return a vector of Strings with the initials of each name.

### Expected Functions

```rust
pub fn initials(names: Vec<&str>) -> Vec<String> {
}
```

> Your heap allocations will be monitored to ensure that you do not make too many allocations, and that your allocations are reasonably sized.

### Usage

Here is a program to test your function:
Expand Down
1 change: 1 addition & 0 deletions subjects/ownership/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create a **function** named `first_subword`, that **moves** a string (takes ownership of it) and returns the first sub-word in it. You can mutate the original string. It should work for `camelCase`, `PascalCase`, and `snake_case`.

### Expected functions

```rust
pub fn first_subword(mut s: String) -> String {
}
Expand Down
1 change: 1 addition & 0 deletions subjects/string_literals/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Create the following functions:
- `find`: that returns the index of the first character of a given string that matches the pattern.

### Expected functions

```rust
pub fn is_empty(v: &str) -> bool {
}
Expand Down
2 changes: 1 addition & 1 deletion subjects/tic_tac_toe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ You must create some functions for a tic-tac-toe checker.

Create a function named `tic_tac_toe`, which receives a tic-tac-toe table. It should return the appropriate string: `"player O won"`, `"player X won"` or `"tie"`.


Also create the following functions, which each accept a player and a table. These functions should return `true` if the player has completed one of the diagonals, rows or columns:

### Expected functions

```rust
pub fn tic_tac_toe(table: [[char; 3]; 3]) -> String {
}
Expand Down
1 change: 1 addition & 0 deletions subjects/to_url/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create a **function** named `to_url` which takes a string and substitutes every ASCII space with `"%20"`.

### Expected functions

```rust
pub fn to_url(s: &str) -> String {
}
Expand Down

0 comments on commit d4f960c

Please sign in to comment.