Rust:- Compilation Error – “expected struct `String`, found `&str`”

Background Playing around with elementary Rust Code and found out more about its strong type checking.   Code Original Output Output - Image Output - Text Explanation The error springs from the fact that the Person structure defines the name variable as a string object. But, we are passing along a string literal.   Definition … Continue reading Rust:- Compilation Error – “expected struct `String`, found `&str`”