This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[macro_export] | |
| macro_rules! avec { | |
| ($($element:expr),*) => {{ | |
| // check that count is const | |
| const C: usize = $crate::count![@COUNT; $($element),*]; | |
| #[allow(unused_mut)] | |
| let mut vs = Vec::with_capacity(C); | |
| $(vs.push($element);)* | |
| vs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/Cargo.toml b/Cargo.toml | |
| index d060d71..88f8a02 100644 | |
| --- a/Cargo.toml | |
| +++ b/Cargo.toml | |
| @@ -1,3 +1,3 @@ | |
| -[workspace] | |
| -version = "3.0" | |
| -members = ["backend", "indexer", "mpc", "store"] | |
| +[workspace] | |
| +version = "3.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // creating a session | |
| const session = await mongoose.startSession(); | |
| // Starting a Session | |
| session.startTransaction(); | |
| //Performing Operations Within a Session | |
| const fromUser = await Account.findOne({ userId: req.userId }).session(session); | |
| const toUser = await Account.findOne({ userId: data.to }).session(session); | |
| await Account.updateOne( |