Commit 8f268d16 authored by Aljaž Srebrnič's avatar Aljaž Srebrnič

Simplify connstring default

parent 92a3375c
......@@ -67,10 +67,7 @@ fn main() {
.build()
.expect("Creating status failed");
let redis_connstring = match var("REDIS_CONNSTRING") {
Ok(s) => s,
Err(_) => String::from("http://localhost")
};
let redis_connstring = var("REDIS_CONNSTRING").unwrap_or(String::from("redis://localhost"));
let manager = RedisConnectionManager::new(&*redis_connstring).unwrap();
let pool = RedisPool::builder()
.build(manager)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment