diff --git a/src/json_schema.rs b/src/json_schema.rs index 982cc66b..411467ca 100644 --- a/src/json_schema.rs +++ b/src/json_schema.rs @@ -97,7 +97,7 @@ pub const DEFAULTSTRING: JssString = JssString { #[derive(Debug)] pub enum ApiStringFormat { None, - Pattern(Regex), + Pattern(Box), Complex(Box), } @@ -339,7 +339,7 @@ fn test_query_string() { let schema = parameter!{name => ApiString!{ optional => false, - format => ApiStringFormat::Pattern(Regex::new("test").unwrap()) + format => ApiStringFormat::Pattern(Box::new(Regex::new("test").unwrap())) }}; let res = parse_query_string("name=abcd", &schema, true); @@ -350,7 +350,7 @@ fn test_query_string() { let schema = parameter!{name => ApiString!{ optional => false, - format => ApiStringFormat::Pattern(Regex::new("^test$").unwrap()) + format => ApiStringFormat::Pattern(Box::new(Regex::new("^test$").unwrap())) }}; let res = parse_query_string("name=ateststring", &schema, true);