diff options
| author | Freya Murphy <freya@freyacat.org> | 2024-02-22 19:40:09 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2024-02-22 19:40:09 -0500 |
| commit | e649cef4255cf9546304f4faa545e351ea636313 (patch) | |
| tree | f9e53c2bc3eb1fd2470d4552d01fd8da098181c5 /matrix-stdlib/src | |
| parent | lang is not expr based (diff) | |
| download | matrix-e649cef4255cf9546304f4faa545e351ea636313.tar.gz matrix-e649cef4255cf9546304f4faa545e351ea636313.tar.bz2 matrix-e649cef4255cf9546304f4faa545e351ea636313.zip | |
indexing and field access
Diffstat (limited to 'matrix-stdlib/src')
| -rw-r--r-- | matrix-stdlib/src/lib.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/matrix-stdlib/src/lib.rs b/matrix-stdlib/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/matrix-stdlib/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); + } +} |