From d9a7498ea76ee420e502aa3722188426ba5daddc Mon Sep 17 00:00:00 2001 From: Katarina Date: Tue, 30 May 2023 22:07:53 -0700 Subject: [PATCH] MNEMONIC-779 create a init subproject for this module Signed-off-by: Katarina --- mnemonic-protocol/Cargo.toml | 8 ++++++++ mnemonic-protocol/src/lib.rs | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 mnemonic-protocol/Cargo.toml create mode 100644 mnemonic-protocol/src/lib.rs diff --git a/mnemonic-protocol/Cargo.toml b/mnemonic-protocol/Cargo.toml new file mode 100644 index 00000000..321866fa --- /dev/null +++ b/mnemonic-protocol/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "mnemonic-protocol" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/mnemonic-protocol/src/lib.rs b/mnemonic-protocol/src/lib.rs new file mode 100644 index 00000000..7d12d9af --- /dev/null +++ b/mnemonic-protocol/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}