Created
November 24, 2020 10:16
-
-
Save tlightsky/f91c3052cd6b12d77c2ac135405cf2e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to_owned is like clone, | |
it move var from stack to heap, | |
it get the ownership, | |
it turn &str to String |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment