diff options
| author | Serguey Parkhomovsky <xindigo@gmail.com> | 2026-03-21 11:45:50 -0700 |
|---|---|---|
| committer | Serguey Parkhomovsky <xindigo@gmail.com> | 2026-03-21 11:45:50 -0700 |
| commit | ea7307674cfdc630785da43c97213c8c774f3f36 (patch) | |
| tree | e0d51efd7240a5989bf7070e23d11f283af49af5 /src/lib.rs | |
| parent | f6d3e56b4ed829286ddc8590f3d4afda01753000 (diff) | |
Return result when failing to parse config.toml
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -191,8 +191,8 @@ pub struct Config { } impl Config { - pub fn load(toml: &str) -> Config { - toml::from_str(toml).expect("Couldn't parse config.toml") + pub fn load(toml: &str) -> Result<Config, toml::de::Error> { + toml::from_str(toml) } } |
