-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove panic by moving problem code out of constructor
The root of the panic is due to us trying to serialize a `Toml::Value::Table` to a Vec<u8> inside a constructor where we can't handle the error cleanly This commit pulls the TOML parsing out of Service::new() into Cfg::to_exported() so we can properly handle the Result<> on toml parsing Note: this does not yet handle the underlying issue which is that the TOML serializer doesn't handle tables well. In particular it requires all keys with non-table values must be emitted first. This is not the default See https://github.com/alexcrichton/toml-rs/blob/master/src/ser.rs#L7-L12 Signed-off-by: James Casey <james@chef.io>
- Loading branch information
James Casey
committed
Jan 4, 2019
1 parent
ece8636
commit aa1cbca
Showing
3 changed files
with
5 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters