Skip to content

Commit 1a5ec4e

Browse files
committed
Updates to Rust 1.83.0
1 parent aa593f4 commit 1a5ec4e

File tree

51 files changed

+162
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+162
-155
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
name: Continuous integration
77
env:
8-
latest_version: "1.82.0"
8+
latest_version: "1.83.0"
99

1010
jobs:
1111
test:

api/formats/swimos_msgpack/src/writer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl<'a, W> MsgPackInterpreter<'a, W> {
9292
}
9393
}
9494

95-
impl<'a, W> MsgPackBodyInterpreter<'a, W> {
95+
impl<W> MsgPackBodyInterpreter<'_, W> {
9696
fn child(&mut self) -> MsgPackInterpreter<'_, W> {
9797
let MsgPackBodyInterpreter { writer, .. } = self;
9898
MsgPackInterpreter::new(*writer)
@@ -193,7 +193,7 @@ impl Display for MsgPackWriteError {
193193

194194
impl std::error::Error for MsgPackWriteError {}
195195

196-
impl<'a, W: Write> PrimitiveWriter for MsgPackInterpreter<'a, W> {
196+
impl<W: Write> PrimitiveWriter for MsgPackInterpreter<'_, W> {
197197
type Repr = ();
198198
type Error = MsgPackWriteError;
199199

@@ -348,7 +348,7 @@ impl<'a, W: Write> HeaderWriter for MsgPackInterpreter<'a, W> {
348348
}
349349
}
350350

351-
impl<'a, W: Write> BodyWriter for MsgPackBodyInterpreter<'a, W> {
351+
impl<W: Write> BodyWriter for MsgPackBodyInterpreter<'_, W> {
352352
type Repr = ();
353353
type Error = MsgPackWriteError;
354354

api/formats/swimos_recon/src/hasher/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ impl<'a> ReconStr<'a> {
4040
}
4141
}
4242

43-
impl<'a> Hash for ReconStr<'a> {
43+
impl Hash for ReconStr<'_> {
4444
fn hash<H: Hasher>(&self, state: &mut H) {
4545
recon_hash(self.0, state)
4646
}
4747
}
4848

49-
impl<'a> PartialEq<Self> for ReconStr<'a> {
49+
impl PartialEq<Self> for ReconStr<'_> {
5050
fn eq(&self, other: &Self) -> bool {
5151
compare_recon_values(self.0, other.0)
5252
}
5353
}
5454

55-
impl<'a> Eq for ReconStr<'a> {}
55+
impl Eq for ReconStr<'_> {}
5656

5757
fn value_from_string(rep: &str) -> Result<Value, ParseError> {
5858
parse_recognize(rep, false)

api/formats/swimos_recon/src/printer/mod.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub fn print_recon_pretty<T: StructuralWritable>(value: &T) -> impl Display + '_
5050

5151
struct ReconPrint<'a, T, S>(&'a T, S);
5252

53-
impl<'a, T: StructuralWritable, S: PrintStrategy + Copy> Display for ReconPrint<'a, T, S> {
53+
impl<T: StructuralWritable, S: PrintStrategy + Copy> Display for ReconPrint<'_, T, S> {
5454
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
5555
let ReconPrint(inner, strategy) = self;
5656
let printer = StructurePrinter::new(f, *strategy);
@@ -68,7 +68,7 @@ struct StructurePrinter<'a, 'b, S> {
6868
delegated: bool,
6969
}
7070

71-
impl<'a, 'b, S: Debug> Debug for StructurePrinter<'a, 'b, S> {
71+
impl<S: Debug> Debug for StructurePrinter<'_, '_, S> {
7272
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
7373
f.debug_struct("StructurePrinter")
7474
.field("strategy", &self.strategy)
@@ -129,7 +129,7 @@ impl<'a, 'b, S> AttributePrinter<'a, 'b, S> {
129129
}
130130
}
131131

132-
impl<'a, 'b, S> PrimitiveWriter for StructurePrinter<'a, 'b, S>
132+
impl<S> PrimitiveWriter for StructurePrinter<'_, '_, S>
133133
where
134134
S: PrintStrategy + Copy,
135135
{
@@ -241,7 +241,7 @@ where
241241
}
242242
}
243243

244-
impl<'a, 'b, S> StructuralWriter for StructurePrinter<'a, 'b, S>
244+
impl<S> StructuralWriter for StructurePrinter<'_, '_, S>
245245
where
246246
S: PrintStrategy + Copy,
247247
{
@@ -253,7 +253,7 @@ where
253253
}
254254
}
255255

256-
impl<'a, 'b, S> HeaderWriter for StructurePrinter<'a, 'b, S>
256+
impl<S> HeaderWriter for StructurePrinter<'_, '_, S>
257257
where
258258
S: PrintStrategy + Copy,
259259
{
@@ -329,7 +329,7 @@ where
329329
}
330330
}
331331

332-
impl<'a, 'b, S> BodyWriter for StructurePrinter<'a, 'b, S>
332+
impl<S> BodyWriter for StructurePrinter<'_, '_, S>
333333
where
334334
S: PrintStrategy + Copy,
335335
{
@@ -457,7 +457,7 @@ fn write_attr_body_val<T: Display>(
457457
}
458458
}
459459

460-
impl<'a, 'b, S> PrimitiveWriter for AttributePrinter<'a, 'b, S>
460+
impl<S> PrimitiveWriter for AttributePrinter<'_, '_, S>
461461
where
462462
S: PrintStrategy + Copy,
463463
{
@@ -642,7 +642,7 @@ where
642642
}
643643
}
644644

645-
impl<'a, 'b, S> StructuralWriter for AttributePrinter<'a, 'b, S>
645+
impl<S> StructuralWriter for AttributePrinter<'_, '_, S>
646646
where
647647
S: PrintStrategy + Copy,
648648
{
@@ -656,7 +656,7 @@ where
656656
}
657657
}
658658

659-
impl<'a, 'b, S> HeaderWriter for AttributePrinter<'a, 'b, S>
659+
impl<S> HeaderWriter for AttributePrinter<'_, '_, S>
660660
where
661661
S: PrintStrategy + Copy,
662662
{
@@ -738,7 +738,7 @@ where
738738
}
739739
}
740740

741-
impl<'a, 'b, S> BodyWriter for AttributePrinter<'a, 'b, S>
741+
impl<S> BodyWriter for AttributePrinter<'_, '_, S>
742742
where
743743
S: PrintStrategy + Copy,
744744
{
@@ -848,7 +848,7 @@ const SINGLE_SPACE: Padding = Padding::Simple(" ");
848848
const PRETTY_INDENT: &str = " ";
849849
const NEW_LINE: &str = "\n";
850850

851-
impl<'a> Display for Padding<'a> {
851+
impl Display for Padding<'_> {
852852
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
853853
match self {
854854
Padding::Simple(padding) => f.write_str(padding)?,

api/swimos_api/src/agent/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ impl Agent for BoxAgent {
302302
}
303303
}
304304

305-
impl<'a, A> Agent for &'a A
305+
impl<A> Agent for &A
306306
where
307307
A: Agent,
308308
{

api/swimos_form/src/structural/bridge/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<R: Recognizer> RecognizerBridge<R> {
5252
}
5353
}
5454

55-
impl<'a, R: Recognizer> SubRecognizerBridge<'a, R> {
55+
impl<R: Recognizer> SubRecognizerBridge<'_, R> {
5656
fn feed_single(self, event: ReadEvent<'_>) -> Result<(), ReadError> {
5757
let SubRecognizerBridge(rec) = self;
5858
if let Some(Err(e)) = rec.feed_event(event) {
@@ -116,7 +116,7 @@ impl<R: Recognizer> PrimitiveWriter for RecognizerBridge<R> {
116116
}
117117
}
118118

119-
impl<'a, R: Recognizer> PrimitiveWriter for SubRecognizerBridge<'a, R> {
119+
impl<R: Recognizer> PrimitiveWriter for SubRecognizerBridge<'_, R> {
120120
type Repr = ();
121121
type Error = ReadError;
122122

@@ -300,7 +300,7 @@ impl<R: Recognizer> BodyWriter for RecognizerBridge<R> {
300300
}
301301
}
302302

303-
impl<'a, R: Recognizer> StructuralWriter for SubRecognizerBridge<'a, R> {
303+
impl<R: Recognizer> StructuralWriter for SubRecognizerBridge<'_, R> {
304304
type Header = Self;
305305
type Body = Self;
306306

@@ -309,7 +309,7 @@ impl<'a, R: Recognizer> StructuralWriter for SubRecognizerBridge<'a, R> {
309309
}
310310
}
311311

312-
impl<'a, R: Recognizer> HeaderWriter for SubRecognizerBridge<'a, R> {
312+
impl<R: Recognizer> HeaderWriter for SubRecognizerBridge<'_, R> {
313313
type Repr = ();
314314
type Error = ReadError;
315315
type Body = Self;
@@ -369,7 +369,7 @@ impl<'a, R: Recognizer> HeaderWriter for SubRecognizerBridge<'a, R> {
369369
}
370370
}
371371

372-
impl<'a, R: Recognizer> BodyWriter for SubRecognizerBridge<'a, R> {
372+
impl<R: Recognizer> BodyWriter for SubRecognizerBridge<'_, R> {
373373
type Repr = ();
374374
type Error = ReadError;
375375

api/swimos_form/src/structural/generic/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use swimos_model::Value;
1919

2020
pub struct WritableRef<'a, T>(&'a T);
2121

22-
impl<'a, T: StructuralWritable> StructuralWritable for WritableRef<'a, T> {
22+
impl<T: StructuralWritable> StructuralWritable for WritableRef<'_, T> {
2323
fn write_with<W: StructuralWriter>(&self, writer: W) -> Result<W::Repr, W::Error> {
2424
self.0.write_with(writer)
2525
}

api/swimos_form/src/structural/read/event.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub enum ReadEvent<'a> {
4242
EndRecord,
4343
}
4444

45-
impl<'a> ReadEvent<'a> {
45+
impl ReadEvent<'_> {
4646
pub fn kind_error(&self, expected: ExpectedEvent) -> ReadError {
4747
let expected = Some(expected);
4848
match self {
@@ -189,73 +189,73 @@ impl PartialEq for NumericValue {
189189
}
190190
}
191191

192-
impl<'a> From<u8> for ReadEvent<'a> {
192+
impl From<u8> for ReadEvent<'_> {
193193
fn from(n: u8) -> Self {
194194
ReadEvent::Number(NumericValue::Int(n.into()))
195195
}
196196
}
197197

198-
impl<'a> From<i16> for ReadEvent<'a> {
198+
impl From<i16> for ReadEvent<'_> {
199199
fn from(n: i16) -> Self {
200200
ReadEvent::Number(NumericValue::Int(n.into()))
201201
}
202202
}
203203

204-
impl<'a> From<u16> for ReadEvent<'a> {
204+
impl From<u16> for ReadEvent<'_> {
205205
fn from(n: u16) -> Self {
206206
ReadEvent::Number(NumericValue::UInt(n.into()))
207207
}
208208
}
209209

210-
impl<'a> From<i8> for ReadEvent<'a> {
210+
impl From<i8> for ReadEvent<'_> {
211211
fn from(n: i8) -> Self {
212212
ReadEvent::Number(NumericValue::Int(n.into()))
213213
}
214214
}
215215

216-
impl<'a> From<i32> for ReadEvent<'a> {
216+
impl From<i32> for ReadEvent<'_> {
217217
fn from(n: i32) -> Self {
218218
ReadEvent::Number(NumericValue::Int(n.into()))
219219
}
220220
}
221221

222-
impl<'a> From<i64> for ReadEvent<'a> {
222+
impl From<i64> for ReadEvent<'_> {
223223
fn from(n: i64) -> Self {
224224
ReadEvent::Number(NumericValue::Int(n))
225225
}
226226
}
227227

228-
impl<'a> From<u32> for ReadEvent<'a> {
228+
impl From<u32> for ReadEvent<'_> {
229229
fn from(n: u32) -> Self {
230230
ReadEvent::Number(NumericValue::UInt(n.into()))
231231
}
232232
}
233233

234-
impl<'a> From<u64> for ReadEvent<'a> {
234+
impl From<u64> for ReadEvent<'_> {
235235
fn from(n: u64) -> Self {
236236
ReadEvent::Number(NumericValue::UInt(n))
237237
}
238238
}
239239

240-
impl<'a> From<f64> for ReadEvent<'a> {
240+
impl From<f64> for ReadEvent<'_> {
241241
fn from(x: f64) -> Self {
242242
ReadEvent::Number(NumericValue::Float(x))
243243
}
244244
}
245245

246-
impl<'a> From<f32> for ReadEvent<'a> {
246+
impl From<f32> for ReadEvent<'_> {
247247
fn from(x: f32) -> Self {
248248
ReadEvent::Number(NumericValue::Float(x.into()))
249249
}
250250
}
251251

252-
impl<'a> From<BigInt> for ReadEvent<'a> {
252+
impl From<BigInt> for ReadEvent<'_> {
253253
fn from(n: BigInt) -> Self {
254254
ReadEvent::Number(NumericValue::BigInt(n))
255255
}
256256
}
257257

258-
impl<'a> From<BigUint> for ReadEvent<'a> {
258+
impl From<BigUint> for ReadEvent<'_> {
259259
fn from(n: BigUint) -> Self {
260260
ReadEvent::Number(NumericValue::BigUint(n))
261261
}
@@ -267,7 +267,7 @@ impl<'a> From<&'a str> for ReadEvent<'a> {
267267
}
268268
}
269269

270-
impl<'a> From<String> for ReadEvent<'a> {
270+
impl From<String> for ReadEvent<'_> {
271271
fn from(s: String) -> Self {
272272
ReadEvent::TextValue(Cow::Owned(s))
273273
}
@@ -279,19 +279,19 @@ impl<'a> From<Cow<'a, str>> for ReadEvent<'a> {
279279
}
280280
}
281281

282-
impl<'a> From<Text> for ReadEvent<'a> {
282+
impl From<Text> for ReadEvent<'_> {
283283
fn from(s: Text) -> Self {
284284
ReadEvent::TextValue(Cow::Owned(s.to_string()))
285285
}
286286
}
287287

288-
impl<'a> From<bool> for ReadEvent<'a> {
288+
impl From<bool> for ReadEvent<'_> {
289289
fn from(p: bool) -> Self {
290290
ReadEvent::Boolean(p)
291291
}
292292
}
293293

294-
impl<'a> From<Vec<u8>> for ReadEvent<'a> {
294+
impl From<Vec<u8>> for ReadEvent<'_> {
295295
fn from(blob: Vec<u8>) -> Self {
296296
ReadEvent::Blob(blob)
297297
}

api/swimos_form/src/structural/write/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ impl StructuralWritable for String {
586586
}
587587
}
588588

589-
impl<'a> StructuralWritable for &'a str {
589+
impl StructuralWritable for &str {
590590
fn num_attributes(&self) -> usize {
591591
0
592592
}

api/swimos_form/src/structural/write/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ fn calculate_body_kind() {
329329
Item::slot(2, "second"),
330330
Item::slot(true, false),
331331
];
332-
let mixed = vec![Item::of(1), Item::slot("second", 2)];
332+
let mixed = [Item::of(1), Item::slot("second", 2)];
333333

334334
assert_eq!(
335335
RecordBodyKind::of_iter(array_like.iter()),

0 commit comments

Comments
 (0)