diff options
author | Radosław Kot <rdkt13@gmail.com> | 2021-04-27 22:46:59 +0200 |
---|---|---|
committer | Radosław Kot <rdkt13@gmail.com> | 2021-05-08 17:43:16 +0200 |
commit | 09498fca75fe04d8a9f56047fcfbd23a4ba6cd5b (patch) | |
tree | a2f46b5a0abb888fe5628776902efd40e2e375f2 /tests/file_ini.rs | |
parent | 98662dd899d4eaab5dc2da07d5bb658960b588a6 (diff) |
Make ConfigBuilder's method consuming
Diffstat (limited to 'tests/file_ini.rs')
-rw-r--r-- | tests/file_ini.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/file_ini.rs b/tests/file_ini.rs index 1f57272..332d3ea 100644 --- a/tests/file_ini.rs +++ b/tests/file_ini.rs @@ -28,9 +28,10 @@ struct Settings { } fn make() -> Config { - let mut c = Config::builder(); - c.add_source(File::new("tests/Settings", FileFormat::Ini)); - c.build().unwrap() + Config::builder() + .add_source(File::new("tests/Settings", FileFormat::Ini)) + .build() + .unwrap() } #[test] @@ -55,9 +56,9 @@ fn test_file() { #[test] fn test_error_parse() { - let mut c = Config::builder(); - c.add_source(File::new("tests/Settings-invalid", FileFormat::Ini)); - let res = c.build(); + let res = Config::builder() + .add_source(File::new("tests/Settings-invalid", FileFormat::Ini)) + .build(); let path: PathBuf = ["tests", "Settings-invalid.ini"].iter().collect(); |