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

35
example/hello/src/lib.rs Normal file
View File

@@ -0,0 +1,35 @@
/// # Example
///
/// ```
/// # use hello::snuggle;
/// let bunnies = snuggle(5);
/// assert_eq!(bunnies, 40);
/// ```
pub fn snuggle(bunnies: u128) -> u128 {
bunnies << 3
}
#[cfg(test)]
mod test {
use std::num::ParseIntError;
use super::*;
#[test]
fn snuggling_bunnies_multiply() {
assert_eq!(snuggle(2), 16);
}
#[should_panic]
#[test]
fn scared_bunny() {
panic!("Hop hoppity hop!");
}
#[test]
fn bunny_result() -> Result<(), ParseIntError> {
let num_bunnies: u64 = "4".parse()?;
assert_eq!(num_bunnies, 4);
Ok(())
}
}

10
example/hello/src/main.rs Normal file
View File

@@ -0,0 +1,10 @@
fn main() {}
#[cfg(test)]
mod test {
#[test]
fn the_bin_test() {
assert_eq!(1 + 1, 2);
}
}