Skip to content

Commit

Permalink
Update 2_intro_to_generics.md
Browse files Browse the repository at this point in the history
corrections after proofreading with Grammarly
  • Loading branch information
georgescharlesbrain authored Oct 10, 2023
1 parent cd2e940 commit 242887f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unit-three/lessons/2_intro_to_generics.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module generics::storage {
}
```

However, this type will only be able to hold a value of type `u64`, to make our `Box` able to hold any generic type, we will need to use generics. The code would be modified as following:
However, this type will only be able to hold a value of type `u64`. To make our `Box` able to hold any generic type, we will need to use generics. The code would be modified as follows:

```rust
module generics::storage {
Expand Down Expand Up @@ -73,7 +73,7 @@ This will only accept inputs of the type `u64` for the `create_box` method, whil

#### Calling Functions with Generics

To call a function with a signature that contains generics, we must specify the type in square brackets, as in the following syntax:
To call a function with a signature that contains generics, we must specify the type in angle brackets, as in the following syntax:

```rust
// value will be of type storage::Box<bool>
Expand Down

0 comments on commit 242887f

Please sign in to comment.