move to another file
This commit is contained in:
parent
d0e3a6e770
commit
8ecc1e6ff1
20
src/about_variables.rs
Normal file
20
src/about_variables.rs
Normal file
@ -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());
|
||||||
|
}
|
||||||
|
}
|
20
src/lib.rs
20
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());
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user