Skip to content

Commit

Permalink
commit handler crate
Browse files Browse the repository at this point in the history
  • Loading branch information
blandger committed Aug 27, 2023
1 parent 4ec0c97 commit 80f6432
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions handler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "handler"
version = "0.1.0"
version.workspace = true
authors.workspace = true
edition.workspace = true
repository.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
lib = { version = "0.1.0", path = "../brainbit" }
14 changes: 14 additions & 0 deletions handler/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit 80f6432

Please sign in to comment.