]> piware.de Git - learn-rust.git/blobdiff - src/main.rs
concepts: rustfmt
[learn-rust.git] / src / main.rs
diff --git a/src/main.rs b/src/main.rs
deleted file mode 100644 (file)
index 058f858..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-mod word_utils;
-
-use word_utils::{first_word, second_word};
-
-fn main() {
-    let s = String::from("Hello world");
-    println!("first word: '{}'", first_word(&s));
-    println!("second word: '{}'", second_word(&s).unwrap());
-
-    let s2 = "hello dude blah";
-    println!("second word of single: '{}'", second_word(s2).unwrap_or("(none)"));
-
-    match second_word(s2) {
-        Some(w) => println!("match: second word of '{}' exists: {}", s2, w),
-        None => println!("match: second word of '{}' does not exist", s2),
-    }
-}