Skip to content

Commit db85a69

Browse files
Fix CI (#136)
* Fix lints * Fix lint * Correct MSRV in README to match value in changelog, CI and Cargo.toml * Update dependencies * Fix build in 1.83.0 Workaround for rust-lang/rust#133824
1 parent 8fd210d commit db85a69

File tree

16 files changed

+285
-221
lines changed

16 files changed

+285
-221
lines changed

Cargo.lock

Lines changed: 244 additions & 180 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ prost_reflect_build::Builder::new()
102102

103103
## Minimum Supported Rust Version
104104

105-
Rust **1.64** or higher.
105+
Rust **1.70** or higher.
106106

107107
The minimum supported Rust version may be changed in the future, but it will be
108108
done with a minor version bump.

README.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ A protobuf library extending [`prost`](https://crates.io/crates/prost) with refl
2828

2929
## Minimum Supported Rust Version
3030

31-
Rust **1.64** or higher.
31+
Rust **1.70** or higher.
3232

3333
The minimum supported Rust version may be changed in the future, but it will be
3434
done with a minor version bump.
626 Bytes
Binary file not shown.

prost-reflect/src/descriptor/api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,13 @@ impl DescriptorPool {
338338
files: &'a [FileDescriptorInner],
339339
}
340340

341-
impl<'a> fmt::Debug for FileDescriptorSet<'a> {
341+
impl fmt::Debug for FileDescriptorSet<'_> {
342342
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
343343
f.debug_struct("FileDescriptorSet").finish_non_exhaustive()
344344
}
345345
}
346346

347-
impl<'a> Message for FileDescriptorSet<'a> {
347+
impl Message for FileDescriptorSet<'_> {
348348
fn encode_raw(&self, buf: &mut impl BufMut)
349349
where
350350
Self: Sized,

prost-reflect/src/descriptor/build/names.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct NameVisitor<'a> {
4747
errors: Vec<DescriptorErrorKind>,
4848
}
4949

50-
impl<'a> Visitor for NameVisitor<'a> {
50+
impl Visitor for NameVisitor<'_> {
5151
fn visit_file(&mut self, path: &[i32], index: FileIndex, file: &FileDescriptorProto) {
5252
debug_assert_eq!(to_index(self.pool.files.len()), index);
5353

@@ -326,7 +326,7 @@ impl<'a> Visitor for NameVisitor<'a> {
326326
}
327327
}
328328

329-
impl<'a> NameVisitor<'a> {
329+
impl NameVisitor<'_> {
330330
fn add_name(
331331
&mut self,
332332
file: FileIndex,

prost-reflect/src/descriptor/build/options.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct OptionsVisitor<'a> {
7474
locations: Vec<(FileIndex, Box<[i32]>, Box<[i32]>)>,
7575
}
7676

77-
impl<'a> Visitor for OptionsVisitor<'a> {
77+
impl Visitor for OptionsVisitor<'_> {
7878
fn visit_file(&mut self, path: &[i32], index: FileIndex, file: &FileDescriptorProto) {
7979
if let Some(options) = &file.options {
8080
let path = join_path(path, &[tag::file::OPTIONS]);
@@ -296,7 +296,7 @@ impl<'a> Visitor for OptionsVisitor<'a> {
296296
}
297297
}
298298

299-
impl<'a> OptionsVisitor<'a> {
299+
impl OptionsVisitor<'_> {
300300
fn resolve_options<T>(
301301
&mut self,
302302
desc_name: &str,

prost-reflect/src/descriptor/build/resolve.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct ResolveVisitor<'a> {
4949
errors: Vec<DescriptorErrorKind>,
5050
}
5151

52-
impl<'a> Visitor for ResolveVisitor<'a> {
52+
impl Visitor for ResolveVisitor<'_> {
5353
fn visit_file(&mut self, path: &[i32], index: FileIndex, file: &FileDescriptorProto) {
5454
let mut transitive_dependencies = HashSet::with_capacity(file.dependency.len() + 1);
5555
transitive_dependencies.insert(index);
@@ -414,7 +414,7 @@ impl<'a> Visitor for ResolveVisitor<'a> {
414414
}
415415
}
416416

417-
impl<'a> ResolveVisitor<'a> {
417+
impl ResolveVisitor<'_> {
418418
fn resolve_public_dependencies(&self, dependencies: &mut HashSet<FileIndex>, index: FileIndex) {
419419
let file = &self.pool.files[index as usize];
420420

prost-reflect/src/descriptor/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ where
545545
src: &'a mut B,
546546
}
547547

548-
impl<'a, B> Buf for CopyBufAdapter<'a, B>
548+
impl<B> Buf for CopyBufAdapter<'_, B>
549549
where
550550
B: Buf,
551551
{

prost-reflect/src/dynamic/fields.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl DynamicMessageFieldSet {
146146
pub(crate) fn iter<'a>(
147147
&'a self,
148148
message: &'a MessageDescriptor,
149-
) -> impl Iterator<Item = ValueAndDescriptor> + 'a {
149+
) -> impl Iterator<Item = ValueAndDescriptor<'a>> + 'a {
150150
self.fields
151151
.iter()
152152
.filter_map(move |(&number, value)| match value {
@@ -179,7 +179,7 @@ impl DynamicMessageFieldSet {
179179
pub(crate) fn iter_include_default<'a>(
180180
&'a self,
181181
message: &'a MessageDescriptor,
182-
) -> impl Iterator<Item = ValueAndDescriptor> + 'a {
182+
) -> impl Iterator<Item = ValueAndDescriptor<'a>> + 'a {
183183
let fields = message
184184
.fields()
185185
.filter(move |f| !f.supports_presence() || self.has(f))

prost-reflect/src/dynamic/serde/de/kind.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use super::{
1414

1515
pub struct KindSeed<'a>(pub &'a Kind, pub &'a DeserializeOptions);
1616

17-
impl<'a, 'de> DeserializeSeed<'de> for KindSeed<'a> {
17+
impl<'de> DeserializeSeed<'de> for KindSeed<'_> {
1818
type Value = Value;
1919

2020
fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
@@ -64,7 +64,7 @@ pub struct MessageVisitor<'a>(pub &'a MessageDescriptor, pub &'a DeserializeOpti
6464
pub struct MessageVisitorInner<'a>(pub &'a mut DynamicMessage, pub &'a DeserializeOptions);
6565
pub struct EnumVisitor<'a>(pub &'a EnumDescriptor);
6666

67-
impl<'a, 'de> Visitor<'de> for ListVisitor<'a> {
67+
impl<'de> Visitor<'de> for ListVisitor<'_> {
6868
type Value = Vec<Value>;
6969

7070
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -86,7 +86,7 @@ impl<'a, 'de> Visitor<'de> for ListVisitor<'a> {
8686
}
8787
}
8888

89-
impl<'a, 'de> Visitor<'de> for MapVisitor<'a> {
89+
impl<'de> Visitor<'de> for MapVisitor<'_> {
9090
type Value = HashMap<MapKey, Value>;
9191

9292
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -133,7 +133,7 @@ impl<'a, 'de> Visitor<'de> for MapVisitor<'a> {
133133
}
134134
}
135135

136-
impl<'de> Visitor<'de> for DoubleVisitor {
136+
impl Visitor<'_> for DoubleVisitor {
137137
type Value = f64;
138138

139139
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -178,7 +178,7 @@ impl<'de> Visitor<'de> for DoubleVisitor {
178178
}
179179
}
180180

181-
impl<'de> Visitor<'de> for FloatVisitor {
181+
impl Visitor<'_> for FloatVisitor {
182182
type Value = f32;
183183

184184
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -235,7 +235,7 @@ impl<'de> Visitor<'de> for FloatVisitor {
235235
}
236236
}
237237

238-
impl<'de> Visitor<'de> for Int32Visitor {
238+
impl Visitor<'_> for Int32Visitor {
239239
type Value = i32;
240240

241241
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -290,7 +290,7 @@ impl<'de> Visitor<'de> for Int32Visitor {
290290
}
291291
}
292292

293-
impl<'de> Visitor<'de> for Uint32Visitor {
293+
impl Visitor<'_> for Uint32Visitor {
294294
type Value = u32;
295295

296296
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -345,7 +345,7 @@ impl<'de> Visitor<'de> for Uint32Visitor {
345345
}
346346
}
347347

348-
impl<'de> Visitor<'de> for Int64Visitor {
348+
impl Visitor<'_> for Int64Visitor {
349349
type Value = i64;
350350

351351
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -392,7 +392,7 @@ impl<'de> Visitor<'de> for Int64Visitor {
392392
}
393393
}
394394

395-
impl<'de> Visitor<'de> for Uint64Visitor {
395+
impl Visitor<'_> for Uint64Visitor {
396396
type Value = u64;
397397

398398
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -439,7 +439,7 @@ impl<'de> Visitor<'de> for Uint64Visitor {
439439
}
440440
}
441441

442-
impl<'de> Visitor<'de> for StringVisitor {
442+
impl Visitor<'_> for StringVisitor {
443443
type Value = String;
444444

445445
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -463,7 +463,7 @@ impl<'de> Visitor<'de> for StringVisitor {
463463
}
464464
}
465465

466-
impl<'de> Visitor<'de> for BoolVisitor {
466+
impl Visitor<'_> for BoolVisitor {
467467
type Value = bool;
468468

469469
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -479,7 +479,7 @@ impl<'de> Visitor<'de> for BoolVisitor {
479479
}
480480
}
481481

482-
impl<'de> Visitor<'de> for BytesVisitor {
482+
impl Visitor<'_> for BytesVisitor {
483483
type Value = Bytes;
484484

485485
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -519,7 +519,7 @@ impl<'de> Visitor<'de> for BytesVisitor {
519519
}
520520
}
521521

522-
impl<'a, 'de> Visitor<'de> for MessageVisitor<'a> {
522+
impl<'de> Visitor<'de> for MessageVisitor<'_> {
523523
type Value = DynamicMessage;
524524

525525
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -538,7 +538,7 @@ impl<'a, 'de> Visitor<'de> for MessageVisitor<'a> {
538538
}
539539
}
540540

541-
impl<'a, 'de> Visitor<'de> for MessageVisitorInner<'a> {
541+
impl<'de> Visitor<'de> for MessageVisitorInner<'_> {
542542
type Value = ();
543543

544544
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -588,7 +588,7 @@ impl<'a, 'de> Visitor<'de> for MessageVisitorInner<'a> {
588588
}
589589
}
590590

591-
impl<'a, 'de> Visitor<'de> for EnumVisitor<'a> {
591+
impl Visitor<'_> for EnumVisitor<'_> {
592592
type Value = i32;
593593

594594
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {

prost-reflect/src/dynamic/serde/de/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ where
8787

8888
struct MessageSeed<'a>(&'a MessageDescriptor, &'a DeserializeOptions);
8989

90-
impl<'a, 'de> DeserializeSeed<'de> for MessageSeed<'a> {
90+
impl<'de> DeserializeSeed<'de> for MessageSeed<'_> {
9191
type Value = DynamicMessage;
9292

9393
fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
@@ -100,7 +100,7 @@ impl<'a, 'de> DeserializeSeed<'de> for MessageSeed<'a> {
100100

101101
struct FieldDescriptorSeed<'a, T>(&'a T, &'a DeserializeOptions);
102102

103-
impl<'a, 'de, T> DeserializeSeed<'de> for FieldDescriptorSeed<'a, T>
103+
impl<'de, T> DeserializeSeed<'de> for FieldDescriptorSeed<'_, T>
104104
where
105105
T: FieldDescriptorLike,
106106
{
@@ -126,7 +126,7 @@ where
126126

127127
struct OptionalFieldDescriptorSeed<'a, T>(&'a T, &'a DeserializeOptions);
128128

129-
impl<'a, 'de, T> DeserializeSeed<'de> for OptionalFieldDescriptorSeed<'a, T>
129+
impl<'de, T> DeserializeSeed<'de> for OptionalFieldDescriptorSeed<'_, T>
130130
where
131131
T: FieldDescriptorLike,
132132
{
@@ -140,7 +140,7 @@ where
140140
}
141141
}
142142

143-
impl<'a, 'de, T> Visitor<'de> for OptionalFieldDescriptorSeed<'a, T>
143+
impl<'de, T> Visitor<'de> for OptionalFieldDescriptorSeed<'_, T>
144144
where
145145
T: FieldDescriptorLike,
146146
{

prost-reflect/src/dynamic/serde/de/wkt.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub struct GoogleProtobufStructVisitor;
3434
pub struct GoogleProtobufValueVisitor;
3535
pub struct GoogleProtobufEmptyVisitor;
3636

37-
impl<'a, 'de> Visitor<'de> for GoogleProtobufAnyVisitor<'a> {
37+
impl<'de> Visitor<'de> for GoogleProtobufAnyVisitor<'_> {
3838
type Value = prost_types::Any;
3939

4040
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -131,7 +131,7 @@ impl<'a, 'de> Visitor<'de> for GoogleProtobufAnyVisitor<'a> {
131131
}
132132
}
133133

134-
impl<'de> Visitor<'de> for GoogleProtobufNullVisitor {
134+
impl Visitor<'_> for GoogleProtobufNullVisitor {
135135
type Value = i32;
136136

137137
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -158,7 +158,7 @@ impl<'de> Visitor<'de> for GoogleProtobufNullVisitor {
158158
}
159159
}
160160

161-
impl<'de> Visitor<'de> for GoogleProtobufTimestampVisitor {
161+
impl Visitor<'_> for GoogleProtobufTimestampVisitor {
162162
type Value = prost_types::Timestamp;
163163

164164
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -179,7 +179,7 @@ impl<'de> Visitor<'de> for GoogleProtobufTimestampVisitor {
179179
}
180180
}
181181

182-
impl<'de> Visitor<'de> for GoogleProtobufDurationVisitor {
182+
impl Visitor<'_> for GoogleProtobufDurationVisitor {
183183
type Value = prost_types::Duration;
184184

185185
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -198,7 +198,7 @@ impl<'de> Visitor<'de> for GoogleProtobufDurationVisitor {
198198
}
199199
}
200200

201-
impl<'de> Visitor<'de> for GoogleProtobufFieldMaskVisitor {
201+
impl Visitor<'_> for GoogleProtobufFieldMaskVisitor {
202202
type Value = prost_types::FieldMask;
203203

204204
fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>

prost-reflect/src/dynamic/serde/ser/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ where
3030
.serialize(serializer)
3131
}
3232

33-
impl<'a> Serialize for SerializeWrapper<'a, DynamicMessage> {
33+
impl Serialize for SerializeWrapper<'_, DynamicMessage> {
3434
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3535
where
3636
S: Serializer,
@@ -237,7 +237,7 @@ impl<'a> Serialize for SerializeWrapper<'a, ValueAndKind<'a>> {
237237
}
238238
}
239239

240-
impl<'a> Serialize for SerializeWrapper<'a, MapKey> {
240+
impl Serialize for SerializeWrapper<'_, MapKey> {
241241
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
242242
where
243243
S: Serializer,

prost-reflect/src/dynamic/serde/ser/wkt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ where
330330
serialize_list_inner(&raw, serializer, options)
331331
}
332332

333-
impl<'a> Serialize for SerializeWrapper<'a, prost_types::Value> {
333+
impl Serialize for SerializeWrapper<'_, prost_types::Value> {
334334
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
335335
where
336336
S: Serializer,

prost-reflect/src/dynamic/text_format/parse/lex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub(crate) struct TokenExtras {
6262
pub error: Option<ParseErrorKind>,
6363
}
6464

65-
impl<'a> fmt::Display for Token<'a> {
65+
impl fmt::Display for Token<'_> {
6666
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6767
match self {
6868
Token::Ident(value) => write!(f, "{}", value),

0 commit comments

Comments
 (0)