using shared lib for shared structs

This commit is contained in:
2026-08-15 18:27:37 +02:00
parent 2e4e6ebdb0
commit f6f1b764a4
5 changed files with 17 additions and 41 deletions
+10 -11
View File
@@ -1,14 +1,13 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, PartialEq)]
pub enum ResponseStatus {
Ok,
Err,
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
#[derive(Serialize, Deserialize)]
pub struct ConectionResponse {
pub status: ResponseStatus,
pub client_id: u32,
}