rearranging rust files and updating crates
This commit is contained in:
parent
9644631f7c
commit
b76f027455
7 changed files with 1097 additions and 0 deletions
17
src/rust/lib.rs
Normal file
17
src/rust/lib.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
mod cxxqt_object;
|
||||
mod service_thing;
|
Loading…
Add table
Add a link
Reference in a new issue