mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-23 15:14:35 +02:00
Merge pull request #93 from Fosco1/patch-1
Corrected typo on receiver.md
This commit is contained in:
commit
12c110d172
@ -9,7 +9,7 @@ are other possible receivers for a method:
|
|||||||
reference. The object can be used again afterwards.
|
reference. The object can be used again afterwards.
|
||||||
* `self`: takes ownership of the object and moves it away from the caller. The
|
* `self`: takes ownership of the object and moves it away from the caller. The
|
||||||
method becomes the owner of the object. The object will be dropped (deallocated)
|
method becomes the owner of the object. The object will be dropped (deallocated)
|
||||||
when the method returns, unless it’s ownership is explicitly
|
when the method returns, unless its ownership is explicitly
|
||||||
transmitted.
|
transmitted.
|
||||||
* No receiver: this becomes a static method on the struct. Typically used to
|
* No receiver: this becomes a static method on the struct. Typically used to
|
||||||
create constructors which are called `new` by convention.
|
create constructors which are called `new` by convention.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user