From 29958c0fd33c5e714b52bed79a1832113c43b8d8 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 26 Jun 2015 23:01:31 +0200 Subject: [PATCH 1/1] add all the parts in workspace's main.rs --- Makefile | 6 ++---- src/main.rs | 3 ++- workspace/src/main.rs | 13 ++++++++----- workspace/src/part00.rs | 2 -- workspace/src/part01.rs | 2 -- workspace/src/part02.rs | 2 -- workspace/src/part03.rs | 2 -- workspace/src/part04.rs | 2 -- workspace/src/part05.rs | 2 -- workspace/src/part06.rs | 2 -- workspace/src/part07.rs | 2 -- workspace/src/part08.rs | 2 -- workspace/src/part09.rs | 2 -- 13 files changed, 12 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 2e7758b..c6c80eb 100644 --- a/Makefile +++ b/Makefile @@ -22,15 +22,13 @@ workspace: $(WORKSPACEFILES) workspace/src/%.rs: src/%.rs Makefile dup-unimpl.sed @mkdir -p .tmp/docs @echo "$< -> $@" - @echo "// ***Remember to enable/add this part in \`main.rs\`!***" > $@ - @echo >> $@ - @sed '/^\s*\/\/@/d;s|\(\s*\)\S.*/\*@\*/|\1unimplemented!()|' $< | sed -f dup-unimpl.sed >> $@ + @sed '/^\s*\/\/@/d;s|\(\s*\)\S.*/\*@\*/|\1unimplemented!()|' $< | sed -f dup-unimpl.sed > $@ workspace/src/main.rs: # Don't touch this file # Crates -crates: +crates: $(WORKSPACEFILES) @cargo build @cd solutions && cargo build @cd workspace && cargo build diff --git a/src/main.rs b/src/main.rs index 70ba796..cf0cd87 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,7 +51,8 @@ // (You can also execute it with `cargo run`, but you'll need to do some work before this will succeed.) // // If you later want to update the course, do `git pull` (or re-download the zip archive). -// Then copy the files from `workspace/src/` to your workspace that you did not yet work on. (Of course you can also +// Then copy the files from `workspace/src/` to your workspace that you did not yet work on. Definitely +// copy `main.rs` to make sure all the new files are actually compiled. (Of course you can also // copy the rest, but that would replace all your hard work by the original files with all the holes!) // Course Content diff --git a/workspace/src/main.rs b/workspace/src/main.rs index 2db7819..5dd1592 100644 --- a/workspace/src/main.rs +++ b/workspace/src/main.rs @@ -1,11 +1,14 @@ #![allow(dead_code, unused_imports, unused_variables, unused_mut)] -// Only the files imported here will be compiled. Remember to add or enable new -// parts here as you progress through the course. +// Only the files imported here will be compiled. mod part00; -// mod part01; -// mod part02; -// mod part03; +mod part01; +mod part02; +mod part03; +mod part04; +mod part05; +mod part06; +mod part07; // This decides which part is actually run. fn main() { diff --git a/workspace/src/part00.rs b/workspace/src/part00.rs index 65769ef..aad3f21 100644 --- a/workspace/src/part00.rs +++ b/workspace/src/part00.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 00: Algebraic datatypes // ====================================== diff --git a/workspace/src/part01.rs b/workspace/src/part01.rs index 0578c43..1b2460c 100644 --- a/workspace/src/part01.rs +++ b/workspace/src/part01.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 01: Expressions, Inherent methods // ================================================ diff --git a/workspace/src/part02.rs b/workspace/src/part02.rs index ece854a..357c5a0 100644 --- a/workspace/src/part02.rs +++ b/workspace/src/part02.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 02: Generic types, Traits // ======================================== diff --git a/workspace/src/part03.rs b/workspace/src/part03.rs index 96ac4bf..d1aea31 100644 --- a/workspace/src/part03.rs +++ b/workspace/src/part03.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 03: Input // ======================== diff --git a/workspace/src/part04.rs b/workspace/src/part04.rs index fb23f29..4f2174a 100644 --- a/workspace/src/part04.rs +++ b/workspace/src/part04.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 04: Ownership, Borrowing // ======================================= diff --git a/workspace/src/part05.rs b/workspace/src/part05.rs index 1eb02d8..a2da18f 100644 --- a/workspace/src/part05.rs +++ b/workspace/src/part05.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 05: Clone // ======================== diff --git a/workspace/src/part06.rs b/workspace/src/part06.rs index a62560e..7288327 100644 --- a/workspace/src/part06.rs +++ b/workspace/src/part06.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 06: Copy, Lifetimes // ================================== diff --git a/workspace/src/part07.rs b/workspace/src/part07.rs index 0130637..6b779cc 100644 --- a/workspace/src/part07.rs +++ b/workspace/src/part07.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 07: Operator Overloading, Tests, Formatting // ========================================================== diff --git a/workspace/src/part08.rs b/workspace/src/part08.rs index d02cad5..90c35f6 100644 --- a/workspace/src/part08.rs +++ b/workspace/src/part08.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 08: Associated Types, Modules (WIP) // ================================================== diff --git a/workspace/src/part09.rs b/workspace/src/part09.rs index 23fd31e..dc329bc 100644 --- a/workspace/src/part09.rs +++ b/workspace/src/part09.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 09: Iterators (WIP) // ================================= -- 2.30.2