Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
🚨 🎨 update format and for lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Oct 10, 2019
1 parent 45899d7 commit 3cebe24
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/internals/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,5 +462,4 @@ mod tests {
}
);
}

}
4 changes: 2 additions & 2 deletions src/internals/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pub(crate) mod macros {
macro_rules! bad_value_or_err {
( $config:expr, $err:expr ) => {
if $config.strict {
Err($err)?
return Err($err);
} else {
HoconValue::BadValue($err)
}
Expand All @@ -13,7 +13,7 @@ pub(crate) mod macros {
macro_rules! public_bad_value_or_err {
( $config:expr, $err:expr ) => {
if $config.strict {
Err($err)?
return Err($err);
} else {
Hocon::BadValue($err)
}
Expand Down
2 changes: 1 addition & 1 deletion src/internals/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl HoconValue {
Err(_) => Ok(public_bad_value_or_err!(config, err)),
}
}
(true, _, Err(err)) | (true, _, Ok(Hocon::BadValue(err))) => Err(err)?,
(true, _, Err(err)) | (true, _, Ok(Hocon::BadValue(err))) => Err(err),
(_, _, v) => v,
}
}
Expand Down
9 changes: 6 additions & 3 deletions src/loader_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ impl HoconLoaderConfig {
} else {
Err(crate::Error::Include {
path: String::from(url),
})?
}
.into())
}
} else if self.external_url {
let body = reqwest::get(parsed_url)
Expand All @@ -220,12 +221,14 @@ impl HoconLoaderConfig {
} else {
Err(crate::Error::Include {
path: String::from(url),
})?
}
.into())
}
} else {
Err(crate::Error::Include {
path: String::from(url),
})?
}
.into())
}
}
}
1 change: 0 additions & 1 deletion src/serde/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,5 +598,4 @@ mod tests {
assert!(res.is_ok());
assert_eq!(res.expect("during test").a, vec![5, 7]);
}

}
1 change: 0 additions & 1 deletion src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,5 +845,4 @@ mod tests {
Some(std::time::Duration::from_secs(60 * 60 * 24 * 365))
);
}

}
4 changes: 2 additions & 2 deletions tests/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::fs::File;
use std::io::prelude::*;

use insta::assert_debug_snapshot_matches;
use insta::assert_debug_snapshot;
use test_generator;

use hocon::{self, Hocon};
Expand Down Expand Up @@ -55,7 +55,7 @@ fn snapshot(file_name: &str) {
.expect("during test");
println!("original file: {}\n{}", file_name, original_content);

assert_debug_snapshot_matches!(
assert_debug_snapshot!(
file_name.split('/').last().expect("during test"),
stable_readable_display(&doc)
);
Expand Down

0 comments on commit 3cebe24

Please sign in to comment.