init rpm-rs

Signed-off-by: Jia Chao <jiachao2130@126.com>
This commit is contained in:
Jia Chao 2024-06-26 10:33:55 +08:00
commit 32e0300df2
3 changed files with 21 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

6
Cargo.toml Normal file
View File

@ -0,0 +1,6 @@
[package]
name = "rpm-rs"
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);
}
}