-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about Idiomatic Rust. #2
Comments
Haven't read too much Rust code in life, so apologies if this is redundant. |
In Rust, when you specify a string as "hello world" what you are doing is creating a static non-mutable I chose to have a mutable |
Great. Thanks for the explanation. |
You could make adjustments with a |
Hello, as someone new to Rust, I have a query about borrowing and method calling syntax for a function that takes a string.
Should the calling syntax of SDK methods that take strings be simplified from, for example:
to
If the function definition is modified as such (change the
network_address
parameter from&String
to&str
and useto_owned
method instead ofclone
):Thought about posting on SO, but thought I would come here first, because it's easier to ask when there is some code for context.
The text was updated successfully, but these errors were encountered: