mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-01-23 23:50:25 +08:00
Add missing 'like'
This commit is contained in:
parent
5c1eed2e50
commit
7f6a281d92
@ -209,7 +209,7 @@ impl Rectangle {
|
||||
```
|
||||
|
||||
To call this associated function, we use the `::` syntax with the struct name:
|
||||
`let sq = Rectange::square(3);`, for example. It's kind of this function is
|
||||
`let sq = Rectange::square(3);`, for example. It's kind of like this function is
|
||||
namespaced by the struct: the `::` syntax is used for both associated functions
|
||||
and namespaces created by modules, which we'll learn about in Chapter 7.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user