Skip to content

Commit 40c06e7

Browse files
authored
fix: ErrorResponse re-used for interpreting NoticeResponse (#705)
1 parent 5843a30 commit 40c06e7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pgdog/src/net/messages/error_response.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ use std::fmt::Display;
44
use std::time::Duration;
55

66
use super::prelude::*;
7-
use crate::{
8-
net::{c_string_buf, code},
9-
state::State,
10-
};
7+
use crate::{net::c_string_buf, state::State};
118

129
/// ErrorResponse (B) message.
1310
#[derive(Debug, Clone)]
@@ -220,8 +217,7 @@ impl Display for ErrorResponse {
220217

221218
impl FromBytes for ErrorResponse {
222219
fn from_bytes(mut bytes: Bytes) -> Result<Self, Error> {
223-
code!(bytes, 'E');
224-
220+
let _code = bytes.get_u8();
225221
let _len = bytes.get_i32();
226222

227223
let mut error_response = ErrorResponse::default();

0 commit comments

Comments
 (0)