[fractal] Backend: Refactor get! and post!
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] Backend: Refactor get! and post!
- Date: Tue, 8 Jan 2019 14:36:37 +0000 (UTC)
commit 2144566a2de042d96381f0bf2c3a38dd8b80b637
Author: Alejandro DomÃnguez <adomu net-c com>
Date: Sat Dec 29 20:59:57 2018 +0100
Backend: Refactor get! and post!
fractal-matrix-api/src/util.rs | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/fractal-matrix-api/src/util.rs b/fractal-matrix-api/src/util.rs
index cc31be75..7679cc62 100644
--- a/fractal-matrix-api/src/util.rs
+++ b/fractal-matrix-api/src/util.rs
@@ -101,27 +101,15 @@ macro_rules! bkerror {
#[macro_export]
macro_rules! get {
- ($url: expr, $attrs: expr, $okcb: expr, $errcb: expr, $timeout: expr) => {
- query!("get", $url, $attrs, $okcb, $errcb, $timeout)
- };
- ($url: expr, $attrs: expr, $okcb: expr, $errcb: expr) => {
- query!("get", $url, $attrs, $okcb, $errcb)
- };
- ($url: expr, $okcb: expr, $errcb: expr) => {
- query!("get", $url, $okcb, $errcb)
+ ($($args: expr),+) => {
+ query!("get", $($args),+)
};
}
#[macro_export]
macro_rules! post {
- ($url: expr, $attrs: expr, $okcb: expr, $errcb: expr, $timeout: expr) => {
- query!("post", $url, $attrs, $okcb, $errcb, $timeout)
- };
- ($url: expr, $attrs: expr, $okcb: expr, $errcb: expr) => {
- query!("post", $url, $attrs, $okcb, $errcb)
- };
- ($url: expr, $okcb: expr, $errcb: expr) => {
- query!("post", $url, $okcb, $errcb)
+ ($($args: expr),+) => {
+ query!("post", $($args),+)
};
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]