-
Notifications
You must be signed in to change notification settings - Fork 61
Reduce duplication, avoid warnings #102
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
Changes from all commits
3c63cc0
326a263
a78ba1a
8a355e9
5d32bb2
2656adf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" # See documentation for possible values | ||
directory: "/generator" # Location of package manifests | ||
- package-ecosystem: "cargo" | ||
directory: "/generator" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "github-actions" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
interval: "weekly" | ||
groups: | ||
cargo-crates: | ||
patterns: | ||
- "*" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
interval: "weekly" | ||
groups: | ||
github-actions: | ||
patterns: | ||
- "*" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,5 @@ members = [ | |
"tripactions", | ||
"zoom" | ||
] | ||
|
||
resolver = "2" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ use inflector::cases::{pascalcase::to_pascal_case, snakecase::to_snake_case}; | |
|
||
use crate::{ | ||
clean_fn_name, clean_name, client::generate_servers, get_parameter_data, make_plural, | ||
oid_to_object_name, path_to_operation_id, struct_name, template::parse, ExtractJsonMediaType, | ||
ParameterDataExt, ReferenceOrExt, TypeId, TypeSpace, | ||
oid_to_object_name, path_to_operation_id, struct_name, template::parse, ParameterDataExt, | ||
ReferenceOrExt, TypeId, TypeSpace, | ||
}; | ||
|
||
#[derive(Debug, Default)] | ||
|
@@ -151,7 +151,7 @@ pub fn generate_files( | |
|
||
let (body_param, body_func) = if let Some(b) = &o.request_body { | ||
if let Ok(b) = b.item() { | ||
if b.is_binary()? { | ||
if crate::is_binary(b)? { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the measurable value to moving this to a free function? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's explained in the commit message, and it's very clear if you look at the commit by itself: a78ba1a?w=1 it removes one copy of a function. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand the change, I was more asking if this has a measurable impact on compilation or runtime performance? I was not able to see it initially on my machine, but that is only one data point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't perform science. I saw duplicated code and removed it. |
||
let (ct, _) = b.content.first().unwrap(); | ||
body_content_type_header = Some(ct.to_string()); | ||
|
||
|
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.
I would prefer to move these changes to a separate PR to consider them independently.
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.
They're in a separate commit. I can send a separate PR.