-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(actix): support parsing arrays for schemas #531
Conversation
Array field types were not being parsed. Also in this case errors were not being handled gracefully. Signed-off-by: Tiago Castro <[email protected]>
@sireaev this should fix it. |
@@ -1491,7 +1493,10 @@ fn handle_unnamed_field_struct( | |||
continue; | |||
} | |||
|
|||
let ty_ref = get_field_type(field); | |||
let ty_ref = match get_field_type(field) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good place for let-else
if that's allowed by the msrv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm seems that it depends on the imported crates
With my lockfile it's 1.60 but if I delete it it's 1.65 due to:
┌─────────────────────────────────────────────────────────────────────
│ error: package hashbrown v0.14.5
cannot be built because it requires rustc 1.63.0 or newer, while the currently active rustc version is 1.62.1 │
│ error: package serde_yaml v0.9.34+deprecated
cannot be built because it requires rustc 1.64 or newer, while the currently active rustc version is 1.63.0 │
│ error: package regex-automata v0.4.7
cannot be built because it requires rustc 1.65 or newer, while the currently active rustc version is 1.64.0 │
└────────────────────────────────────────────────────────────────
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. The MSRV aware resolver can't come soon enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks good to me. I need to revisit the maps and see if this is happening for the value types there also
Array field types were not being parsed.
Also in this case errors were not being handled gracefully.
Resolves #454