aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2019-03-19 10:59:14 +0200
committerHristo Venev <hristo@venev.name>2019-03-19 10:59:14 +0200
commite9634eae716cb83364ba472a58f1b1a958996658 (patch)
treebc2214de78dad4f5e3a7b5c997e7e3138c97b724
parentd5274083487c1b47063a84356286dd76179b4e26 (diff)
rustfmt
-rw-r--r--src/main.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 14018e8..088d68e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -200,8 +200,8 @@ fn fetch_source(url: &str) -> io::Result<proto::Source> {
}
fn load_config(path: &str) -> io::Result<config::Config> {
- use toml;
use std::fs;
+ use toml;
let mut data = String::new();
{
@@ -210,9 +210,8 @@ fn load_config(path: &str) -> io::Result<config::Config> {
config_file.read_to_string(&mut data)?;
}
let mut de = toml::Deserializer::new(&data);
- serde::Deserialize::deserialize(&mut de).map_err(|e| {
- io::Error::new(io::ErrorKind::InvalidData, e)
- })
+ serde::Deserialize::deserialize(&mut de)
+ .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))
}
fn main() {