Skip to content

Commit e418a62

Browse files
committed
Fix message names
1 parent c16d144 commit e418a62

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/message.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ pub enum Backend {
3030
CommandComplete {
3131
tag: String,
3232
},
33-
// FIXME naming
34-
BCopyData {
33+
CopyData {
3534
data: Vec<u8>,
3635
},
37-
BCopyDone,
36+
CopyDone,
3837
CopyInResponse {
3938
format: u8,
4039
column_formats: Vec<u16>,
@@ -348,12 +347,12 @@ impl<R: BufRead + StreamOptions> ReadMessage for R {
348347
payload: try!(rdr.read_cstr()),
349348
}
350349
}
351-
b'c' => Backend::BCopyDone,
350+
b'c' => Backend::CopyDone,
352351
b'C' => Backend::CommandComplete { tag: try!(rdr.read_cstr()) },
353352
b'd' => {
354353
let mut data = vec![];
355354
try!(rdr.read_to_end(&mut data));
356-
Backend::BCopyData { data: data }
355+
Backend::CopyData { data: data }
357356
}
358357
b'D' => try!(read_data_row(&mut rdr)),
359358
b'E' => Backend::ErrorResponse { fields: try!(read_fields(&mut rdr)) },

src/stmt.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl<'conn> Statement<'conn> {
154154
Backend::CopyOutResponse { .. } => {
155155
loop {
156156
match try!(conn.read_message()) {
157-
Backend::BCopyDone => break,
157+
Backend::CopyDone => break,
158158
Backend::ErrorResponse { fields } => {
159159
try!(conn.wait_for_ready());
160160
return DbError::new(fields);
@@ -405,7 +405,7 @@ impl<'conn> Statement<'conn> {
405405
let count;
406406
loop {
407407
match try!(info.conn.read_message()) {
408-
Backend::BCopyData { data } => {
408+
Backend::CopyData { data } => {
409409
let mut data = &data[..];
410410
while !data.is_empty() {
411411
match w.write_with_info(data, &info) {
@@ -420,7 +420,7 @@ impl<'conn> Statement<'conn> {
420420
}
421421
}
422422
}
423-
Backend::BCopyDone => {}
423+
Backend::CopyDone => {}
424424
Backend::CommandComplete { tag } => {
425425
count = parse_update_count(tag);
426426
break;

0 commit comments

Comments
 (0)