mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 11:24:45 +08:00
feat: add utility to convert TOML configuration file to list of environment variables (#3096)
This commit is contained in:
@ -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"}"#;
|
||||
|
||||
Reference in New Issue
Block a user