rust-by-practice
rust-by-practice copied to clipboard
Change Pair creation code on the Traits src and solution files.
Change the code to use the 'new' associated function instead create the Struct with the curly brackets syntax.
Hi, I have a question, why should we use new instead of curly brackets syntax.
Hello, thanks for your response In this case, just because the new function is already implemented for the structure on the sample code and it is not used In my opinion we can use new() instead bracket syntax or remove the new() function