-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Bump Rust edition to 2021 and a few crates #18608
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
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ license = "{{.}}" | |
# Override this license by providing a License Object in the OpenAPI. | ||
license = "Unlicense" | ||
{{/licenseInfo}} | ||
edition = "2018" | ||
edition = "2021" | ||
{{#publishRustRegistry}} | ||
publish = ["{{.}}"] | ||
{{/publishRustRegistry}} | ||
|
@@ -32,14 +32,13 @@ homepage = "{{.}} | |
{{/homePageUrl}} | ||
|
||
[dependencies] | ||
serde = "^1.0" | ||
serde_derive = "^1.0" | ||
serde = { version = "^1.0", features = ["derive"] } | ||
{{#serdeWith}} | ||
serde_with = { version = "^3", default-features = false, features = ["base64", "std", "macros"] } | ||
serde_with = { version = "^3.8", default-features = false, features = ["base64", "std", "macros"] } | ||
{{/serdeWith}} | ||
serde_json = "^1.0" | ||
url = "^2.2" | ||
uuid = { version = "^1.0", features = ["serde", "v4"] } | ||
url = "^2.5" | ||
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. |
||
uuid = { version = "^1.8", features = ["serde", "v4"] } | ||
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. |
||
{{#hyper}} | ||
hyper = { version = "~0.14", features = ["full"] } | ||
hyper-tls = "~0.5" | ||
|
@@ -54,16 +53,15 @@ secrecy = "0.8.0" | |
{{/withAWSV4Signature}} | ||
{{#reqwest}} | ||
{{^supportAsync}} | ||
[dependencies.reqwest] | ||
version = "^0.11" | ||
features = ["json", "blocking", "multipart"] | ||
reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } | ||
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. |
||
{{#supportMiddleware}} | ||
reqwest-middleware = { version = "^0.3", features = ["json", "blocking", "multipart"] } | ||
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.
|
||
{{/supportMiddleware}} | ||
{{/supportAsync}} | ||
{{#supportAsync}} | ||
reqwest = { version = "^0.12", features = ["json", "multipart"] } | ||
{{#supportMiddleware}} | ||
reqwest-middleware = "0.2.0" | ||
reqwest-middleware = { version = "^0.3", features = ["json", "multipart"] } | ||
{{/supportMiddleware}} | ||
[dependencies.reqwest] | ||
version = "^0.11" | ||
features = ["json", "multipart"] | ||
{{/supportAsync}} | ||
{{/reqwest}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,19 +29,19 @@ impl From<(hyper::StatusCode, hyper::body::Body)> for Error { | |
|
||
impl From<http::Error> for Error { | ||
fn from(e: http::Error) -> Self { | ||
return Error::Http(e) | ||
Error::Http(e) | ||
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. No need to |
||
} | ||
} | ||
|
||
impl From<hyper::Error> for Error { | ||
fn from(e: hyper::Error) -> Self { | ||
return Error::Hyper(e) | ||
Error::Hyper(e) | ||
} | ||
} | ||
|
||
impl From<serde_json::Error> for Error { | ||
fn from(e: serde_json::Error) -> Self { | ||
return Error::Serde(e) | ||
Error::Serde(e) | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{{>partial_header}} | ||
|
||
use reqwest; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
use crate::{apis::ResponseContent, models}; | ||
use super::{Error, configuration}; | ||
|
||
|
@@ -174,7 +174,7 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: | |
{{/bodyParams}} | ||
{{/hasBodyParam}} | ||
{{^hasBodyParam}} | ||
&"", | ||
"", | ||
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. Clippy to the rescue :) |
||
{{/hasBodyParam}} | ||
) { | ||
Ok(new_headers) => new_headers, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[workspace] | ||
members = ["hyper/*", "reqwest/*", "reqwest-regression-16119"] | ||
resolver = "2" |
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.
Using
serde
with thederive
feature instead ofserde_derive
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.
Note:
serde_derive
hasn't been required in years at this point :) Even theserde
docs show using thederive
feature: https://serde.rs/derive.html#using-derive