xlogic_core/
lib.rs

1// SPDX-FileCopyrightText: Copyright 2023 xlogic <https://xlogic.dev> and contributors to the project
2// SPDX-License-Identifier: Apache-2.0
3// SPDX-FileContributor: 2023 Tymoteusz Blazejczyk <tymoteusz.blazejczyk@tymonx.com>
4
5pub fn add(left: usize, right: usize) -> usize {
6    left + right
7}
8
9#[cfg(test)]
10mod tests {
11    use super::*;
12
13    #[test]
14    fn it_works() {
15        let result = add(2, 2);
16        assert_eq!(result, 4);
17    }
18}