Skip to content

Commit

Permalink
fixes serialization of regex pattern + description
Browse files Browse the repository at this point in the history
  • Loading branch information
ProofOfKeags committed Jun 7, 2022
1 parent 9217d00 commit 901ea62
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/src/config/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@ pub struct Pattern {

#[derive(Clone, Debug, Serialize)]
pub struct ValueSpecString {
#[serde(flatten)]
pub pattern: Option<Pattern>,
pub copyable: bool,
pub masked: bool,
Expand Down Expand Up @@ -2166,10 +2167,9 @@ fn missing_pattern_produces_error() {

#[test]
fn regex_control() {
assert!(
serde_yaml::from_reader::<_, ConfigSpec>(std::io::Cursor::new(include_bytes!(
"../../test/config-spec/lnd-correct.yaml"
)))
.is_ok()
)
let spec = serde_yaml::from_reader::<_, ConfigSpec>(std::io::Cursor::new(include_bytes!(
"../../test/config-spec/lnd-correct.yaml"
)))
.unwrap();
println!("{}", serde_json::to_string_pretty(&spec).unwrap());
}

0 comments on commit 901ea62

Please sign in to comment.