added basic library files

This commit is contained in:
Nickiel12 2024-08-17 01:05:41 +00:00
parent 1a74df568a
commit 166f366650
2 changed files with 20 additions and 0 deletions

6
Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "vcs-common"
version = "0.1.0"
edition = "2021"
[dependencies]

14
src/lib.rs Normal file
View file

@ -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);
}
}