feat: add utility to convert TOML configuration file to list of environment variables (#3096)

This commit is contained in:
Sanchith Hegde
2023-12-11 13:20:19 +05:30
committed by GitHub
parent 4e8de46423
commit 2c4599a1cd
30 changed files with 485 additions and 466 deletions

View File

@ -117,7 +117,7 @@ fn without_serialize() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
#[test]
fn for_string() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
#[cfg_attr(feature = "serde", derive(Serialize))]
#[cfg_attr(all(feature = "alloc", feature = "serde"), derive(Serialize))]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Composite {
secret_number: Secret<String>,
@ -147,7 +147,7 @@ fn for_string() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
// serialize
#[cfg(feature = "serde")]
#[cfg(all(feature = "alloc", feature = "serde"))]
{
let got = serde_json::to_string(&composite).unwrap();
let exp = r#"{"secret_number":"abc","not_secret":"not secret"}"#;