Skip to content

Commit 27c9cab

Browse files
committed
fixup unexpected_message
1 parent 59ea058 commit 27c9cab

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

tokio-postgres/src/replication_client.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,11 @@ impl ReplicationClient {
284284
let mut responses = self.send(command).await?;
285285
let rowdesc = match responses.next().await? {
286286
Message::RowDescription(m) => m,
287-
m => return Err(Error::unexpected_message(m)),
287+
_ => return Err(Error::unexpected_message()),
288288
};
289289
let datarow = match responses.next().await? {
290290
Message::DataRow(m) => m,
291-
m => return Err(Error::unexpected_message(m)),
291+
_ => return Err(Error::unexpected_message()),
292292
};
293293

294294
let fields = rowdesc.fields().collect::<Vec<_>>().map_err(Error::parse)?;
@@ -326,11 +326,11 @@ impl ReplicationClient {
326326
let mut responses = self.send(&command).await?;
327327
let rowdesc = match responses.next().await? {
328328
Message::RowDescription(m) => m,
329-
m => return Err(Error::unexpected_message(m)),
329+
_ => return Err(Error::unexpected_message()),
330330
};
331331
let datarow = match responses.next().await? {
332332
Message::DataRow(m) => m,
333-
m => return Err(Error::unexpected_message(m)),
333+
_ => return Err(Error::unexpected_message()),
334334
};
335335

336336
let fields = rowdesc.fields().collect::<Vec<_>>().map_err(Error::parse)?;
@@ -355,11 +355,11 @@ impl ReplicationClient {
355355

356356
let rowdesc = match responses.next().await? {
357357
Message::RowDescription(m) => m,
358-
m => return Err(Error::unexpected_message(m)),
358+
_ => return Err(Error::unexpected_message()),
359359
};
360360
let datarow = match responses.next().await? {
361361
Message::DataRow(m) => m,
362-
m => return Err(Error::unexpected_message(m)),
362+
_ => return Err(Error::unexpected_message()),
363363
};
364364

365365
let fields = rowdesc.fields().collect::<Vec<_>>().map_err(Error::parse)?;
@@ -434,11 +434,11 @@ impl ReplicationClient {
434434

435435
let rowdesc = match responses.next().await? {
436436
Message::RowDescription(m) => m,
437-
m => return Err(Error::unexpected_message(m)),
437+
_ => return Err(Error::unexpected_message()),
438438
};
439439
let datarow = match responses.next().await? {
440440
Message::DataRow(m) => m,
441-
m => return Err(Error::unexpected_message(m)),
441+
_ => return Err(Error::unexpected_message()),
442442
};
443443

444444
let fields = rowdesc.fields().collect::<Vec<_>>().map_err(Error::parse)?;
@@ -514,11 +514,11 @@ impl ReplicationClient {
514514

515515
let rowdesc = match responses.next().await? {
516516
Message::RowDescription(m) => m,
517-
m => return Err(Error::unexpected_message(m)),
517+
_ => return Err(Error::unexpected_message()),
518518
};
519519
let datarow = match responses.next().await? {
520520
Message::DataRow(m) => m,
521-
m => return Err(Error::unexpected_message(m)),
521+
_ => return Err(Error::unexpected_message()),
522522
};
523523

524524
let fields = rowdesc.fields().collect::<Vec<_>>().map_err(Error::parse)?;
@@ -705,7 +705,7 @@ impl ReplicationClient {
705705
replication_response =
706706
Some(recv_replication_response(&mut responses, rowdesc).await?);
707707
}
708-
m => return Err(Error::unexpected_message(m)),
708+
_ => return Err(Error::unexpected_message()),
709709
}
710710

711711
Ok(Box::pin(ReplicationStream {
@@ -789,7 +789,7 @@ impl ReplicationStream<'_> {
789789
*this.copydone_received = true;
790790
break;
791791
}
792-
m => return Err(Error::unexpected_message(m)),
792+
_ => return Err(Error::unexpected_message()),
793793
}
794794
}
795795
}
@@ -800,7 +800,7 @@ impl ReplicationStream<'_> {
800800
Some(recv_replication_response(this.responses, rowdesc).await?);
801801
}
802802
Message::CommandComplete(_) => (),
803-
m => return Err(Error::unexpected_message(m)),
803+
_ => return Err(Error::unexpected_message()),
804804
}
805805

806806
Ok(this.replication_response.clone())
@@ -833,7 +833,7 @@ impl Stream for ReplicationStream<'_> {
833833
*this.copydone_sent = true;
834834
Poll::Ready(None)
835835
}
836-
m => Poll::Ready(Some(Err(Error::unexpected_message(m)))),
836+
_ => Poll::Ready(Some(Err(Error::unexpected_message()))),
837837
}
838838
}
839839
}
@@ -875,6 +875,6 @@ async fn recv_replication_response(
875875
next_tli_startpos: Lsn::from(from_utf8(switch).unwrap()),
876876
})
877877
}
878-
m => Err(Error::unexpected_message(m)),
878+
_ => Err(Error::unexpected_message()),
879879
}
880880
}

0 commit comments

Comments
 (0)