You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, it fails to decode ?flow=123&tag=latest. Replacing flow type with String makes it pass.
#[derive(Deserialize,Debug)]#[serde(untagged)]pubenumQuery1{// fail when using i32FlowTag{flow:i32,tag:String},Id{id:String},}#[derive(Deserialize,Debug)]#[serde(untagged)]pubenumQuery2{// success when using a stringFlowTag{flow:String,tag:String},Id{id:String},}let req = TestRequest::with_uri("/start?flow=123&tag=latest").to_http_request();
web::Query::<Query1>::extract(&req).await.unwrap();
web::Query::<Query2>::extract(&req).await.unwrap();
The text was updated successfully, but these errors were encountered:
Steps to Reproduce (for bugs)
I have 2 kinds of query, using this enum:
However, it fails to decode
?flow=123&tag=latest
. Replacingflow
type withString
makes it pass.The text was updated successfully, but these errors were encountered: