aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Pasquet <dev@etenil.net>2022-02-15 21:25:13 +0000
committerGuillaume Pasquet <dev@etenil.net>2022-02-15 21:25:13 +0000
commited5090e427d05a0c8d413c20b754a93214034db2 (patch)
treeebf8ff7ed8668b1e7a27497761ea8e9ed3f1a22b /src
parent60f721b94ae70533a4a6ee9ffa7d24e5a19abff5 (diff)
Add gitlab-ci
Diffstat (limited to 'src')
-rw-r--r--src/barbfile.rs4
-rw-r--r--src/executor.rs6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/barbfile.rs b/src/barbfile.rs
index 39e4485..a039253 100644
--- a/src/barbfile.rs
+++ b/src/barbfile.rs
@@ -53,7 +53,7 @@ impl Method {
match self {
Method::GET => false,
Method::DELETE => false,
- _ => true
+ _ => true,
}
}
}
@@ -173,7 +173,7 @@ impl FromStr for BarbFile {
Ok(BarbFile {
header: BarbHeader::new(method, url, headers, filter),
- body: if body == "" {None} else {Some(body)},
+ body: if body == "" { None } else { Some(body) },
})
}
}
diff --git a/src/executor.rs b/src/executor.rs
index 189df6f..ef97ace 100644
--- a/src/executor.rs
+++ b/src/executor.rs
@@ -20,7 +20,7 @@ impl Context {
pub fn empty() -> Context {
Context {
- vars: HashMap::new()
+ vars: HashMap::new(),
}
}
@@ -52,9 +52,7 @@ pub struct Executor {
impl Executor {
pub fn new(context: Context) -> Executor {
- Executor {
- context
- }
+ Executor { context }
}
pub fn execute(&mut self, bfile: BarbFile) -> Result<ureq::Response, String> {