mirror of
https://github.com/rust-lang/rustlings
synced 2024-11-14 00:17:16 +00:00
move to another file
This commit is contained in:
parent
d0e3a6e770
commit
8ecc1e6ff1
2 changed files with 20 additions and 20 deletions
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 a new issue