Skip to content

Commit f7c2165

Browse files
Merge pull request #34 from stormshield-gt/bump-reqwest
bump reqwest to 0.13
2 parents 1ed432d + fa0a777 commit f7c2165

12 files changed

Lines changed: 32 additions & 33 deletions

Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ edition = "2018"
1313
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1414

1515
[features]
16-
default = ["reqwest/default-tls"]
16+
default = ["rustls"]
17+
rustls = ["reqwest/rustls"]
1718
blocking = ["reqwest/blocking"]
18-
rustls-tls = ["reqwest/rustls-tls"]
19+
native-tls = ["reqwest/native-tls"]
20+
rustls-no-provider = ["reqwest/rustls-no-provider"]
1921

2022
[workspace]
2123
members = [
@@ -27,7 +29,7 @@ anyhow = "1.0.56"
2729
async-trait = "0.1.52"
2830
bytes = "1.1.0"
2931
http = "1"
30-
reqwest = { version = "0.12.2", default-features = false, optional = true }
32+
reqwest = { version = "0.13.0", default-features = false }
3133
rustify_derive = { version = "0.5.4", path = "rustify_derive" }
3234
serde = { version = "1.0.136", features = ["derive"] }
3335
serde_json = "1.0.79"

src/blocking/clients.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
//! Contains implementations of [Client][crate::blocking::client::Client] which
22
//! use varying blocking HTTP clients.
3-
#[cfg(feature = "reqwest")]
43
pub mod reqwest;

src/clients.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
//! Contains implementations of [Client][crate::client::Client] which use
22
//! varying HTTP clients.
3-
#[cfg(feature = "reqwest")]
43
pub mod reqwest;

src/endpoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ pub trait Endpoint: Send + Sync + Sized {
239239
Ok(EndpointResult::new(resp, Self::RESPONSE_BODY_TYPE))
240240
}
241241

242-
fn with_middleware<M: MiddleWare>(self, middleware: &M) -> MutatedEndpoint<Self, M> {
242+
fn with_middleware<M: MiddleWare>(self, middleware: &M) -> MutatedEndpoint<'_, Self, M> {
243243
MutatedEndpoint::new(self, middleware)
244244
}
245245

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
//! The following features are available for this crate:
195195
//!
196196
//! * `blocking`: Enables the blocking variants of `Client`s as well as the blocking
197-
//! `exec()` functions in `Endpoint`s.
197+
//! `exec()` functions in `Endpoint`s.
198198
//!
199199
//! ## Error Handling
200200
//!

tests/macro/empty_attr.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ warning: unused import: `rustify::endpoint::Endpoint`
1616
1 | use rustify::endpoint::Endpoint;
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1818
|
19-
= note: `#[warn(unused_imports)]` on by default
19+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

tests/macro/invalid_data.stderr

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,27 @@ warning: unused import: `rustify::endpoint::Endpoint`
1111
1 | use rustify::endpoint::Endpoint;
1212
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1313
|
14-
= note: `#[warn(unused_imports)]` on by default
14+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
1515

1616
error[E0308]: mismatched types
1717
--> tests/macro/invalid_data.rs:5:17
1818
|
19-
5 | #[derive(Debug, Endpoint, Serialize)]
20-
| ^^^^^^^^
21-
| |
22-
| expected `Vec<u8>`, found `String`
23-
| arguments to this enum variant are incorrect
24-
|
25-
= note: expected struct `Vec<u8>`
26-
found struct `std::string::String`
27-
help: the type constructed contains `std::string::String` due to the type of the argument passed
28-
--> tests/macro/invalid_data.rs:5:17
29-
|
30-
5 | #[derive(Debug, Endpoint, Serialize)]
31-
| ^^^^^^^^ this argument influences the type of `Some`
19+
5 | #[derive(Debug, Endpoint, Serialize)]
20+
| ^^^^^^^^
21+
| |
22+
| expected `Vec<u8>`, found `String`
23+
| arguments to this enum variant are incorrect
24+
|
25+
= note: expected struct `Vec<u8>`
26+
found struct `String`
27+
help: the type constructed contains `String` due to the type of the argument passed
28+
--> tests/macro/invalid_data.rs:5:17
29+
|
30+
5 | #[derive(Debug, Endpoint, Serialize)]
31+
| ^^^^^^^^ this argument influences the type of `Some`
3232
note: tuple variant defined here
33-
--> $RUST/core/src/option.rs
34-
= note: this error originates in the derive macro `Endpoint` (in Nightly builds, run with -Z macro-backtrace for more info)
35-
help: call `Into::into` on this expression to convert `std::string::String` into `Vec<u8>`
36-
|
37-
5 | #[derive(Debug, Endpoint.into(), Serialize)]
38-
| +++++++
33+
--> $RUST/core/src/option.rs
34+
|
35+
| Some(#[stable(feature = "rust1", since = "1.0.0")] T),
36+
| ^^^^
37+
= note: this error originates in the derive macro `Endpoint` (in Nightly builds, run with -Z macro-backtrace for more info)

tests/macro/invalid_method.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unused import: `rustify::endpoint::Endpoint`
44
1 | use rustify::endpoint::Endpoint;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: `#[warn(unused_imports)]` on by default
7+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
88

99
error[E0599]: no variant or associated item named `TEST` found for enum `RequestMethod` in the current scope
1010
--> tests/macro/invalid_method.rs:6:41

tests/macro/invalid_result.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ warning: unused import: `rustify::endpoint::Endpoint`
1010
1 | use rustify::endpoint::Endpoint;
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
|
13-
= note: `#[warn(unused_imports)]` on by default
13+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

tests/macro/invalid_type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unused import: `rustify::endpoint::Endpoint`
44
1 | use rustify::endpoint::Endpoint;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: `#[warn(unused_imports)]` on by default
7+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
88

99
error[E0599]: no variant or associated item named `BAD` found for enum `RequestType` in the current scope
1010
--> tests/macro/invalid_type.rs:6:47

0 commit comments

Comments
 (0)