From 680c8633e6206085ad417c6055e17f6d30f462a4 Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Wed, 9 Sep 2020 21:52:02 +0800 Subject: Manage multiple packages using workspaces --- add/add-one/src/lib.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 add/add-one/src/lib.rs (limited to 'add/add-one/src') diff --git a/add/add-one/src/lib.rs b/add/add-one/src/lib.rs new file mode 100644 index 0000000..40ceb12 --- /dev/null +++ b/add/add-one/src/lib.rs @@ -0,0 +1,13 @@ +pub fn add_one(x: i32) -> i32 { + x + 1 +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + assert_eq!(3, add_one(2)); + } +} -- cgit v1.2.3