-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #11113 - rdimartino:maybeworkspace-deserialize, r=epage
Improve errors for TOML fields that support workspace inheritance Fixes #10997 This also addresses the issue with `MaybeWorkspace<VecStringOrBool>` mentioned in #10942: ``` Caused by: invalid type: string "foo", expected a boolean or vector of strings for key `package.publish` ``` I removed the `maybe_workspace_vec_string` deserializer in 7a50c0c because the error message from the inner `Vec<String>` is now surfaced, but I can revert that if it's preferable to keep those changes. I tried to base the `deserialize` implementation off of the derived impl for an untagged enum from `cargo expand`. This approach [ultimately led me](https://github.com/serde-rs/serde/blob/v1.0.144/serde/src/private/de.rs#L218) to adding the `serde-value` dependency.
- Loading branch information
Showing
3 changed files
with
68 additions
and
49 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