Skip to content
Snippets Groups Projects
Commit 6bd1f1e0 authored by gnom's avatar gnom :penguin:
Browse files

code formatting

parent 0ef63462
No related branches found
Tags v0.1.0
No related merge requests found
PB_BASEURL=wiki.example.com/lib/exe/xmlrpc.php
PB_BASEURL=wiki.example.com
PB_TLS=true
PB_USERNAME=username
PB_PASSWORD=password
......
......@@ -54,8 +54,10 @@ impl Config {
Ok(i) => return Ok(i),
Err(_) => return Err(format!("Unable to parse {} to i8", var)),
};
},
Err(_) => return Err(format!("Environment varibale {} is not set", var).to_string()),
}
Err(_) => {
return Err(format!("Environment varibale {} is not set", var).to_string())
}
};
}
......@@ -154,4 +156,4 @@ impl Config {
protocol, self.username, self.password, self.baseurl
);
}
}
\ No newline at end of file
}
......@@ -149,7 +149,12 @@ fn update_startpage(
};
}
fn update_plenum_list(config: &Config, list_page: &str, page: &str, year: &str) -> Result<(), String> {
fn update_plenum_list(
config: &Config,
list_page: &str,
page: &str,
year: &str,
) -> Result<(), String> {
let mut content = match get_page(config, list_page) {
Ok(c) => c,
Err(err) => return Err(err),
......@@ -216,18 +221,6 @@ fn main() {
log::debug!("next plenum: {}", next_date);
log::debug!("Namespace: {}", config.namespace);
let plenum_list_page = format!("{}:start", config.namespace);
match update_plenum_list(
&config,
&plenum_list_page,
format!("{}:{}", config.namespace, next_date).as_str(),
date.format("%Y").to_string().as_str(),
) {
Ok(()) => (),
Err(err) => log::debug!("{}", err),
};
// check if page for next week already exists
let next_plenum_page = format!("{}:{}", config.namespace, next_date);
if page_exists(&config, &next_plenum_page) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment