diff --git a/utshell-0.5/Cargo.toml b/utshell-0.5/Cargo.toml index 49c15672e95367b0a239748baacd2e3f90ad8d82..22fa0e8a5eaecb1b5c87a7c432c206b010a050b0 100644 --- a/utshell-0.5/Cargo.toml +++ b/utshell-0.5/Cargo.toml @@ -97,7 +97,7 @@ members=[ "r_bracecomp", "r_variables", "r_arrayfunc" -] +, "r_error"] [dependencies] libc = "*" @@ -173,5 +173,6 @@ members=[ r_array = {path = "./r_array"} r_bracecomp = {path = "./r_bracecomp"} r_variables = {path = "./r_variables"} + r_error = {path = "./r_error"} intl_pluralrules = "7.0.2" tinystr = "=0.7.1" diff --git a/utshell-0.5/r_error/Cargo.toml b/utshell-0.5/r_error/Cargo.toml new file mode 100644 index 0000000000000000000000000000000000000000..f2532fe16550b7b7bfa5ec6c5ca25d01f1d78ffe --- /dev/null +++ b/utshell-0.5/r_error/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "r_error" +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/utshell-0.5/r_error/src/lib.rs b/utshell-0.5/r_error/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..7d12d9af8195bf5e19d10c7b592b359ccd014149 --- /dev/null +++ b/utshell-0.5/r_error/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); + } +}