feature/authentication service #9

Merged
GW_MC merged 19 commits from feature/authentication into master 2025-12-19 12:24:49 +08:00
Showing only changes of commit 6cd37d6758 - Show all commits

View File

@@ -1,12 +1,12 @@
#[macro_export]
macro_rules! with_conn {
// Usage: with_conn!(connection, tx_option, ident, |conn|-> { ... })
// Usage: with_conn!(&connection, tx_option, ident, |conn|-> { ... })
($conn:expr, $tx:expr, $ident:ident, $body:block) => {{
if let Some(t) = $tx {
if let Some(t) = &$tx {
let $ident = t;
$body
} else {
let $ident = $conn;
let $ident = &$conn;
$body
}
}};