Skip to content

Commit

Permalink
hopefully the last time pleasing the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
SaculRennorb committed Feb 15, 2024
1 parent b7feded commit 3bb789e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion poem-openapi-derive/src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub(crate) fn generate(args: DeriveInput) -> GeneratorResult<TokenStream> {
Some(ref function) => quote! { #function },
None => quote! { #crate_name::types::ParseFromJSON::parse_from_json },
};

deserialize_fields.push(quote! {
#[allow(non_snake_case)]
let #field_ident: #field_ty = {
Expand Down
2 changes: 0 additions & 2 deletions poem-openapi/tests/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1072,10 +1072,8 @@ fn deserialize_with() {
.ok_or(poem_openapi::types::ParseError::custom("Unknown error")) // bad error, but its good enough for tests
}


assert_eq!(
Obj::parse_from_json(Some(json!({"a": "3 + 4"}))).unwrap(),
Obj { a: 7 }
);
}

0 comments on commit 3bb789e

Please sign in to comment.