summaryrefslogtreecommitdiffstats
path: root/tests/file_toml.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/file_toml.rs')
-rw-r--r--tests/file_toml.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/file_toml.rs b/tests/file_toml.rs
index cee80b7..9493bbd 100644
--- a/tests/file_toml.rs
+++ b/tests/file_toml.rs
@@ -44,9 +44,10 @@ struct Settings {
#[cfg(test)]
fn make() -> Config {
- let mut c = Config::builder();
- c.add_source(File::new("tests/Settings", FileFormat::Toml));
- c.build().unwrap()
+ Config::builder()
+ .add_source(File::new("tests/Settings", FileFormat::Toml))
+ .build()
+ .unwrap()
}
#[test]
@@ -77,9 +78,9 @@ fn test_file() {
#[test]
fn test_error_parse() {
- let mut c = Config::builder();
- c.add_source(File::new("tests/Settings-invalid", FileFormat::Toml));
- let res = c.build();
+ let res = Config::builder()
+ .add_source(File::new("tests/Settings-invalid", FileFormat::Toml))
+ .build();
let path_with_extension: PathBuf = ["tests", "Settings-invalid.toml"].iter().collect();