mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-01-23 23:50:25 +08:00
Fix a typo that got into the dictionary
This commit is contained in:
parent
cf52d81371
commit
1771ae0ebd
@ -160,7 +160,6 @@ RAII
|
||||
randcrate
|
||||
READMEs
|
||||
rect
|
||||
Rectange
|
||||
redeclaring
|
||||
RefCell
|
||||
repr
|
||||
|
@ -236,7 +236,7 @@ impl Rectangle {
|
||||
```
|
||||
|
||||
To call this associated function, we use the `::` syntax with the struct name:
|
||||
`let sq = Rectange::square(3);`, for example. This function is namespaced by
|
||||
`let sq = Rectangle::square(3);`, for example. 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