We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INF
Here is the minimal test set to reproduce the issue
val: INF
#[cfg(test)] mod tests { use config::Config; use serde::Deserialize; #[test] fn test_yaml_inf() { #[derive(Deserialize)] struct Settings { pub val: String, } let cfg = Config::builder() .add_source(config::File::with_name("assets/config.yaml")) .build() .unwrap(); let settings = cfg.try_deserialize::<Settings>().unwrap(); assert_eq!(settings.val, "INF"); } }
[package] name = "hl-issue-288" version = "0.1.0" edition = "2021" [dependencies] config = { version = "0", features = ["yaml"] } serde = { version = "1", features = ["derive"] }
String
"INF"
"inf"
+Inf
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Here is the minimal test set to reproduce the issue
Source Files
assets/config.yaml
src/lib.rs
Cargo.toml
Expected results
INF
value is deserialized to aString
as"INF"
Actual results
INF
value is deserialized to aString
as"inf"
Notes
INF
is deserialized to some internal representation as a float+Inf
value before it is deserialized to aString
.The text was updated successfully, but these errors were encountered: