You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: embed deserialize validation logic in ProgressConfig (#16194)
### What does this PR try to resolve?
We have a custom `serde(deserialize_with = "progress_or_string")` to
support
`term.progress = "never" | "auto" | <progress table>`.
It was claimed we added in #8165 [^1] but actually never
worked,
because `Deserializer::deserialize_option` [^2] never called
`visit_str`.
This PR remove the custom `progress_or_string`
so that the deserialization logic can be baked in the type itself.
### How to test and review this PR?
I've tested 1.50 Cargo and `progress = "never"` failed with the same
reason as the newly added test.
[^1]:
#8165 (comment)
[^2]:
https://github.com/rust-lang/cargo/blob/c369b8c8d85a/src/cargo/util/config/de.rs#L135-L145
0 commit comments