Call Another Function
Explore how to define and call functions in Rust that work with structs, focusing on ownership principles. Understand how passing values can lead to ownership errors and prepare to resolve them in upcoming lessons.
We'll cover the following...
We'll cover the following...
This lesson is going to continue building on the code from the last lesson. You should keep coming back to this code block and continuing the edits.
Now it’s time to define our price_fruit function. For the moment, comment out the count_fruit function call in main by putting // in front of it. Then add the ...