the.bay.news

What's wrong with this line and why?

The Rust Programming Language Forum
What's wrong with this line and why?
fn main() { let name = String::from("hello"); let (name, len) = calc_len(name); println!("{name} : {len}"); } fn calc_len(name:String)->(String,usize) { (name,name.len()) // this one ???? }

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.