mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-08 17:35:18 +00:00
framework agnostic core cargo
This commit is contained in:
1 parent
afc8bc60e0
commit
876b879a65
16 files changed
+5569
-31
No files matched your search
@@ -0,0 +1,16 @@
|
||||
pub mod models;
|
||||
|
||||
pub fn add(left: u64, right: u64) -> u64 {
|
||||
left + right
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Entry {
|
||||
pub id: i64,
|
||||
pub word: String,
|
||||
pub definition: String,
|
||||
}
|
||||
Reference in new issue
Block a user