Skip to content

Commit

Permalink
Bug fix: avoid panic when no config
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceadams committed Aug 1, 2017
1 parent ad960a4 commit bd903f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub fn configuration_with_name(
|c| c["name"].as_str() == Some(configuration_name)
})
.last()
.expect("No configuration found")
.unwrap_or(Value::Null)
.clone()
}

Expand All @@ -125,7 +125,7 @@ pub fn configuration_with_id(
|c| c["configuration_id"].as_str() == Some(configuration_id)
})
.last()
.expect("No configuration found")
.unwrap_or(Value::Null)
.clone()
}

Expand Down

0 comments on commit bd903f4

Please sign in to comment.