From 8ecc1e6ff12152822add7c69d143e836010c6f8a Mon Sep 17 00:00:00 2001 From: olivia Date: Sun, 6 May 2018 17:27:03 +0200 Subject: [PATCH] move to another file --- src/about_variables.rs | 20 ++++++++++++++++++++ src/lib.rs | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 src/about_variables.rs diff --git a/src/about_variables.rs b/src/about_variables.rs new file mode 100644 index 0000000..4459509 --- /dev/null +++ b/src/about_variables.rs @@ -0,0 +1,20 @@ +#[allow(dead_code)] +mod about_variables { + pub fn guess_this () -> i32 { + let one = 5; + let two = 7; + let three = 3; + let result = (one + two) / three; + return result; + } +} + +#[cfg(test)] +mod tests { + use super::about_variables::*; + + #[test] + fn test_complicated () { + assert_eq!(___, guess_this()); + } +} diff --git a/src/lib.rs b/src/lib.rs index 4459509..e69de29 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,20 +0,0 @@ -#[allow(dead_code)] -mod about_variables { - pub fn guess_this () -> i32 { - let one = 5; - let two = 7; - let three = 3; - let result = (one + two) / three; - return result; - } -} - -#[cfg(test)] -mod tests { - use super::about_variables::*; - - #[test] - fn test_complicated () { - assert_eq!(___, guess_this()); - } -}