X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/87eef0eb20858188744e529fb0c5f1282577b8e4..46c141eefadadaf82b1414ae19d3766bbd4ba0cc:/src/part00.rs diff --git a/src/part00.rs b/src/part00.rs index 90b04ef..4deb829 100644 --- a/src/part00.rs +++ b/src/part00.rs @@ -7,6 +7,7 @@ // We are going to make use of the standard library, so let's import that: use std; +// ## Getting started // Let us start by thinking about the *type* of our function. Rust forces us to give the types of // all arguments, and the return type, before we even start writing the body. In the case of our minimum // function, we may be inclined to say that it returns a number. But then we would be in trouble: What's @@ -91,7 +92,7 @@ fn print_number_or_nothing(n: NumberOrNothing) { } // Putting it all together: -pub fn part_main() { +pub fn main() { let vec = read_vec(); let min = vec_min(vec); print_number_or_nothing(min);