From: Ralf Jung Date: Wed, 10 Jun 2015 21:18:03 +0000 (+0200) Subject: part_main -> main X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/315bf91eb0b309b29c732ca7726df1f6ca9f567e?ds=sidebyside;hp=3987fcc2f98699396b8babb14e8911941d339a01 part_main -> main --- diff --git a/Makefile b/Makefile index 706b1db..bb5826c 100644 --- a/Makefile +++ b/Makefile @@ -8,4 +8,4 @@ docs: rawsrc: @mkdir -p rawsrc - @for file in $(FILES); do echo "$$file -> raw$$file"; egrep -v "^[[:space:]]*// " "$$file" > "raw""$$file"; done + @for file in $(FILES); do echo "$$file -> rawsrc/$$file"; egrep -v "^[[:space:]]*// " "$$file" > "rawsrc/""$$file"; done diff --git a/src/main.rs b/src/main.rs index 3ee288c..e151dc1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,7 +57,7 @@ mod part03; // function. fn main() { - part00::part_main(); + part00::main(); } // Additional material diff --git a/src/part00.rs b/src/part00.rs index 90b04ef..c922007 100644 --- a/src/part00.rs +++ b/src/part00.rs @@ -91,7 +91,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); diff --git a/src/part01.rs b/src/part01.rs index d046a1b..1603c14 100644 --- a/src/part01.rs +++ b/src/part01.rs @@ -79,7 +79,7 @@ impl NumberOrNothing { fn read_vec() -> Vec { vec![18,5,7,2,9,27] } -pub fn part_main() { +pub fn main() { let vec = read_vec(); let min = vec_min(vec); min.print(); diff --git a/src/part02.rs b/src/part02.rs index b8641df..51c20cf 100644 --- a/src/part02.rs +++ b/src/part02.rs @@ -122,7 +122,7 @@ impl SomethingOrNothing { fn read_vec() -> Vec { vec![18,5,7,3,9,27] } -pub fn part_main() { +pub fn main() { let vec = read_vec(); let min = vec_min(vec); min.print(); diff --git a/src/part03.rs b/src/part03.rs index b9b7ce8..a7cfb1a 100644 --- a/src/part03.rs +++ b/src/part03.rs @@ -105,7 +105,7 @@ impl SomethingOrNothing { // If you update your `main.rs` to use part 03, `cargo run` should now ask you for some numbers, // and tell you the minimum. Neat, isn't it? -pub fn part_main() { +pub fn main() { let vec = read_vec(); let min = vec_min(vec); min.print();