Use singular for directory names

This commit is contained in:
Nathan Stocks
2021-06-12 23:36:49 -06:00
parent b492b359b3
commit 9848a889ea
20 changed files with 2 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
// 1. Wow. Just...wow. Let's start cleaning this up by running `cargo fmt`.
// 2. `cargo fmt` is great, but it doesn't add blank lines where there are none. Go ahead and add
// some blank lines in places you think it would make sense.
// 3. Time to clean up! Run `cargo clippy`. Fix up all the warnings so `cargo clippy` is silent.
// Challenge: Clippy doesn't find *everything*. What else would you change to make this code better?
const pi:f32=3.14159265358979323846;
fn count_to_5()->i32{let mut foo =(0);loop{if{foo>pi as i32}{if(foo > 5){break;}}foo=foo+1;}return 5;}
fn main() {
println!("I can count to {}", count_to_5());
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_counting() {
assert_eq!(count_to_5() == 5, true);
}
}