From 42256831d2a679a24c94124824d783968d87e422 Mon Sep 17 00:00:00 2001 From: Ivan Akimov Date: Mon, 17 Jul 2023 17:15:56 -0500 Subject: [PATCH] wip --- .gitignore | 2 ++ Cargo.toml | 6 ++++++ src/lib.rs | 3 +++ tests/simple.rs | 7 +++++++ 4 files changed, 18 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 src/lib.rs create mode 100644 tests/simple.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a9d37c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +target +Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..30699af --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "sqids" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..211bfff --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,3 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} diff --git a/tests/simple.rs b/tests/simple.rs new file mode 100644 index 0000000..a0b4cac --- /dev/null +++ b/tests/simple.rs @@ -0,0 +1,7 @@ +use sqids::add; + +#[test] +fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); +} \ No newline at end of file