Skip to content

Commit c271029

Browse files
Update dependency rust to v1.89.0 (#1389)
1 parent 20af806 commit c271029

37 files changed

+227
-33
lines changed

dropshot/examples/pagination-multiple-sorts.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,19 +379,19 @@ impl ProjectCollection {
379379

380380
// Iterate by name (ascending, descending)
381381

382-
pub fn iter_by_name_asc(&self) -> ProjectIter {
382+
pub fn iter_by_name_asc(&self) -> ProjectIter<'_> {
383383
self.make_iter(self.by_name.iter())
384384
}
385-
pub fn iter_by_name_desc(&self) -> ProjectIter {
385+
pub fn iter_by_name_desc(&self) -> ProjectIter<'_> {
386386
self.make_iter(self.by_name.iter().rev())
387387
}
388-
pub fn iter_by_name_asc_from(&self, last_seen: &str) -> ProjectIter {
388+
pub fn iter_by_name_asc_from(&self, last_seen: &str) -> ProjectIter<'_> {
389389
let iter = self
390390
.by_name
391391
.range((Bound::Excluded(last_seen.to_string()), Bound::Unbounded));
392392
self.make_iter(iter)
393393
}
394-
pub fn iter_by_name_desc_from(&self, last_seen: &str) -> ProjectIter {
394+
pub fn iter_by_name_desc_from(&self, last_seen: &str) -> ProjectIter<'_> {
395395
let iter = self
396396
.by_name
397397
.range((Bound::Unbounded, Bound::Excluded(last_seen.to_string())))
@@ -401,17 +401,17 @@ impl ProjectCollection {
401401

402402
// Iterate by mtime (ascending, descending)
403403

404-
pub fn iter_by_mtime_asc(&self) -> ProjectIter {
404+
pub fn iter_by_mtime_asc(&self) -> ProjectIter<'_> {
405405
self.make_iter(self.by_mtime.iter())
406406
}
407-
pub fn iter_by_mtime_desc(&self) -> ProjectIter {
407+
pub fn iter_by_mtime_desc(&self) -> ProjectIter<'_> {
408408
self.make_iter(self.by_mtime.iter().rev())
409409
}
410410
pub fn iter_by_mtime_asc_from(
411411
&self,
412412
last_mtime: &DateTime<Utc>,
413413
last_name: &str,
414-
) -> ProjectIter {
414+
) -> ProjectIter<'_> {
415415
let last_seen = &(*last_mtime, last_name.to_string());
416416
let iter =
417417
self.by_mtime.range((Bound::Excluded(last_seen), Bound::Unbounded));
@@ -421,7 +421,7 @@ impl ProjectCollection {
421421
&self,
422422
last_mtime: &DateTime<Utc>,
423423
last_name: &str,
424-
) -> ProjectIter {
424+
) -> ProjectIter<'_> {
425425
let last_seen = &(*last_mtime, last_name.to_string());
426426
let iter = self
427427
.by_mtime

dropshot/src/api_description.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ impl<Context: ServerContext> ApiDescription<Context> {
643643
&self,
644644
title: S,
645645
version: semver::Version,
646-
) -> OpenApiDefinition<Context>
646+
) -> OpenApiDefinition<'_, Context>
647647
where
648648
S: AsRef<str>,
649649
{

dropshot/tests/fail/bad_trait_channel4.stderr

Lines changed: 69 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
2+
--> tests/fail/bad_trait_channel4.rs:26:18
3+
|
4+
26 | _params: Query<QueryParams>,
5+
| ^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
6+
|
7+
= help: the following other types implement trait `schemars::JsonSchema`:
8+
&'a T
9+
&'a mut T
10+
()
11+
(T0, T1)
12+
(T0, T1, T2)
13+
(T0, T1, T2, T3)
14+
(T0, T1, T2, T3, T4)
15+
(T0, T1, T2, T3, T4, T5)
16+
and $N others
17+
note: required by a bound in `dropshot::Query`
18+
--> src/extractor/query.rs
19+
|
20+
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
21+
| ^^^^^^^^^^ required by this bound in `Query`
22+
23+
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
24+
--> tests/fail/bad_trait_channel4.rs:26:18
25+
|
26+
26 | _params: Query<QueryParams>,
27+
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
28+
|
29+
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
30+
= note: for types from other crates check whether the crate offers a `serde` feature flag
31+
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
32+
&'a [u8]
33+
&'a camino::Utf8Path
34+
&'a std::path::Path
35+
&'a str
36+
()
37+
(T,)
38+
(T0, T1)
39+
(T0, T1, T2)
40+
and $N others
41+
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
42+
note: required by a bound in `dropshot::Query`
43+
--> src/extractor/query.rs
44+
|
45+
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
46+
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
47+
148
error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
249
--> tests/fail/bad_trait_channel4.rs:39:5
350
|
@@ -54,10 +101,14 @@ note: required by a bound in `dropshot::Query`
54101
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
55102

56103
error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
57-
--> tests/fail/bad_trait_channel4.rs:16:1
104+
--> tests/fail/bad_trait_channel4.rs:39:5
58105
|
59-
16 | #[dropshot::api_description]
60-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
106+
39 | / async fn bad_channel(
107+
40 | | _rqctx: RequestContext<()>,
108+
41 | | _params: Query<QueryParams>,
109+
42 | | _upgraded: WebsocketConnection,
110+
43 | | ) -> dropshot::WebsocketChannelResult {
111+
| |_________________________________________^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
61112
|
62113
= help: the following other types implement trait `schemars::JsonSchema`:
63114
&'a T
@@ -74,13 +125,16 @@ note: required by a bound in `dropshot::Query`
74125
|
75126
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
76127
| ^^^^^^^^^^ required by this bound in `Query`
77-
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)
78128

79129
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
80-
--> tests/fail/bad_trait_channel4.rs:16:1
130+
--> tests/fail/bad_trait_channel4.rs:39:5
81131
|
82-
16 | #[dropshot::api_description]
83-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
132+
39 | / async fn bad_channel(
133+
40 | | _rqctx: RequestContext<()>,
134+
41 | | _params: Query<QueryParams>,
135+
42 | | _upgraded: WebsocketConnection,
136+
43 | | ) -> dropshot::WebsocketChannelResult {
137+
| |_________________________________________^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
84138
|
85139
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
86140
= note: for types from other crates check whether the crate offers a `serde` feature flag
@@ -100,7 +154,6 @@ note: required by a bound in `dropshot::Query`
100154
|
101155
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
102156
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
103-
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)
104157

105158
error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
106159
--> tests/fail/bad_trait_channel4.rs:41:18
@@ -150,10 +203,10 @@ note: required by a bound in `dropshot::Query`
150203
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
151204

152205
error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
153-
--> tests/fail/bad_trait_channel4.rs:26:18
206+
--> tests/fail/bad_trait_channel4.rs:16:1
154207
|
155-
26 | _params: Query<QueryParams>,
156-
| ^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
208+
16 | #[dropshot::api_description]
209+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
157210
|
158211
= help: the following other types implement trait `schemars::JsonSchema`:
159212
&'a T
@@ -170,12 +223,13 @@ note: required by a bound in `dropshot::Query`
170223
|
171224
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
172225
| ^^^^^^^^^^ required by this bound in `Query`
226+
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)
173227

174228
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
175-
--> tests/fail/bad_trait_channel4.rs:26:18
229+
--> tests/fail/bad_trait_channel4.rs:16:1
176230
|
177-
26 | _params: Query<QueryParams>,
178-
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
231+
16 | #[dropshot::api_description]
232+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
179233
|
180234
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
181235
= note: for types from other crates check whether the crate offers a `serde` feature flag
@@ -195,6 +249,7 @@ note: required by a bound in `dropshot::Query`
195249
|
196250
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
197251
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
252+
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)
198253

199254
error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
200255
--> tests/fail/bad_trait_channel4.rs:20:5

dropshot/tests/fail/bad_trait_channel5.stderr

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
2+
--> tests/fail/bad_trait_channel5.rs:27:18
3+
|
4+
27 | _params: Query<QueryParams>,
5+
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
6+
|
7+
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
8+
= note: for types from other crates check whether the crate offers a `serde` feature flag
9+
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
10+
&'a [u8]
11+
&'a camino::Utf8Path
12+
&'a std::path::Path
13+
&'a str
14+
()
15+
(T,)
16+
(T0, T1)
17+
(T0, T1, T2)
18+
and $N others
19+
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
20+
note: required by a bound in `dropshot::Query`
21+
--> src/extractor/query.rs
22+
|
23+
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
24+
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
25+
126
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
227
--> tests/fail/bad_trait_channel5.rs:39:5
328
|
@@ -28,10 +53,14 @@ note: required by a bound in `dropshot::Query`
2853
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
2954

3055
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
31-
--> tests/fail/bad_trait_channel5.rs:17:1
56+
--> tests/fail/bad_trait_channel5.rs:39:5
3257
|
33-
17 | #[dropshot::api_description]
34-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
58+
39 | / async fn bad_channel(
59+
40 | | _rqctx: RequestContext<Self::Context>,
60+
41 | | _params: Query<QueryParams>,
61+
42 | | _upgraded: WebsocketConnection,
62+
43 | | ) -> dropshot::WebsocketChannelResult {
63+
| |_________________________________________^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
3564
|
3665
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
3766
= note: for types from other crates check whether the crate offers a `serde` feature flag
@@ -51,7 +80,6 @@ note: required by a bound in `dropshot::Query`
5180
|
5281
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
5382
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
54-
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)
5583

5684
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
5785
--> tests/fail/bad_trait_channel5.rs:41:18
@@ -79,10 +107,10 @@ note: required by a bound in `dropshot::Query`
79107
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
80108

81109
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
82-
--> tests/fail/bad_trait_channel5.rs:27:18
110+
--> tests/fail/bad_trait_channel5.rs:17:1
83111
|
84-
27 | _params: Query<QueryParams>,
85-
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
112+
17 | #[dropshot::api_description]
113+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
86114
|
87115
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
88116
= note: for types from other crates check whether the crate offers a `serde` feature flag
@@ -102,6 +130,7 @@ note: required by a bound in `dropshot::Query`
102130
|
103131
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
104132
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
133+
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)
105134

106135
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
107136
--> tests/fail/bad_trait_channel5.rs:21:5

dropshot/tests/fail/bad_trait_endpoint4.stderr

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,59 @@ note: required by a bound in `dropshot::Query`
5151
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
5252
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
5353

54+
error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
55+
--> tests/fail/bad_trait_endpoint4.rs:38:5
56+
|
57+
38 | / async fn bad_endpoint(
58+
39 | | _rqctx: RequestContext<()>,
59+
40 | | _params: Query<QueryParams>,
60+
41 | | ) -> Result<HttpResponseUpdatedNoContent, HttpError> {
61+
| |________________________________________________________^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
62+
|
63+
= help: the following other types implement trait `schemars::JsonSchema`:
64+
&'a T
65+
&'a mut T
66+
()
67+
(T0, T1)
68+
(T0, T1, T2)
69+
(T0, T1, T2, T3)
70+
(T0, T1, T2, T3, T4)
71+
(T0, T1, T2, T3, T4, T5)
72+
and $N others
73+
note: required by a bound in `dropshot::Query`
74+
--> src/extractor/query.rs
75+
|
76+
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
77+
| ^^^^^^^^^^ required by this bound in `Query`
78+
79+
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
80+
--> tests/fail/bad_trait_endpoint4.rs:38:5
81+
|
82+
38 | / async fn bad_endpoint(
83+
39 | | _rqctx: RequestContext<()>,
84+
40 | | _params: Query<QueryParams>,
85+
41 | | ) -> Result<HttpResponseUpdatedNoContent, HttpError> {
86+
| |________________________________________________________^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
87+
|
88+
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
89+
= note: for types from other crates check whether the crate offers a `serde` feature flag
90+
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
91+
&'a [u8]
92+
&'a camino::Utf8Path
93+
&'a std::path::Path
94+
&'a str
95+
()
96+
(T,)
97+
(T0, T1)
98+
(T0, T1, T2)
99+
and $N others
100+
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
101+
note: required by a bound in `dropshot::Query`
102+
--> src/extractor/query.rs
103+
|
104+
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
105+
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
106+
54107
error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
55108
--> tests/fail/bad_trait_endpoint4.rs:40:18
56109
|

dropshot/tests/fail/bad_trait_endpoint5.stderr

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,34 @@ note: required by a bound in `dropshot::Query`
2626
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
2727
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
2828

29+
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
30+
--> tests/fail/bad_trait_endpoint5.rs:39:5
31+
|
32+
39 | / async fn bad_endpoint(
33+
40 | | _rqctx: RequestContext<()>,
34+
41 | | _params: Query<QueryParams>,
35+
42 | | ) -> Result<HttpResponseUpdatedNoContent, HttpError> {
36+
| |________________________________________________________^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`
37+
|
38+
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
39+
= note: for types from other crates check whether the crate offers a `serde` feature flag
40+
= help: the following other types implement trait `serde::de::Deserialize<'de>`:
41+
&'a [u8]
42+
&'a camino::Utf8Path
43+
&'a std::path::Path
44+
&'a str
45+
()
46+
(T,)
47+
(T0, T1)
48+
(T0, T1, T2)
49+
and $N others
50+
= note: required for `QueryParams` to implement `serde::de::DeserializeOwned`
51+
note: required by a bound in `dropshot::Query`
52+
--> src/extractor/query.rs
53+
|
54+
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
55+
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
56+
2957
error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
3058
--> tests/fail/bad_trait_endpoint5.rs:41:18
3159
|

dropshot/tests/integration-tests/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ impl TestCertificateChain {
100100
Self { root_cert, intermediate_cert, end_keypair, end_cert }
101101
}
102102

103-
pub fn end_cert_private_key(&self) -> rustls::pki_types::PrivateKeyDer {
103+
pub fn end_cert_private_key(&self) -> rustls::pki_types::PrivateKeyDer<'_> {
104104
rustls::pki_types::PrivateKeyDer::from(
105105
rustls::pki_types::PrivatePkcs8KeyDer::from(
106106
self.end_keypair.serialize_der(),
107107
),
108108
)
109109
}
110110

111-
pub fn cert_chain(&self) -> Vec<rustls::pki_types::CertificateDer> {
111+
pub fn cert_chain(&self) -> Vec<rustls::pki_types::CertificateDer<'_>> {
112112
vec![
113113
self.end_cert.der().clone(),
114114
self.intermediate_cert.der().clone(),

dropshot_endpoint/src/channel.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ impl<'ast> ChannelParams<'ast> {
332332
let rqctx_context = self.rqctx_context();
333333
let rqctx_check = quote_spanned! { self.rqctx_ty.orig_span()=>
334334
const _: fn() = || {
335+
#[allow(dead_code)]
335336
struct NeedRequestContext(#rqctx_context);
336337
};
337338
};

0 commit comments

Comments
 (0)