I am a newbie to Rust with experience in Go. In Go, if the function parameters have the same type, it can be written more simplify like this, so I would like to ask, can Rust also support similar syntax?
func Foo(a, b int32) {}
I am a newbie to Rust with experience in Go. In Go, if the function parameters have the same type, it can be written more simplify like this, so I would like to ask, can Rust also support similar syntax?
func Foo(a, b int32) {}
If you're new to rust, you might be looking for the users forum.
Rust can do this, though:
fn foo([a, b]: [i32; 2]) {}
Thanks for your reply. Well, this is what I want. Thank you.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.