File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,10 @@ pub enum Backend {
30
30
CommandComplete {
31
31
tag : String ,
32
32
} ,
33
- // FIXME naming
34
- BCopyData {
33
+ CopyData {
35
34
data : Vec < u8 > ,
36
35
} ,
37
- BCopyDone ,
36
+ CopyDone ,
38
37
CopyInResponse {
39
38
format : u8 ,
40
39
column_formats : Vec < u16 > ,
@@ -348,12 +347,12 @@ impl<R: BufRead + StreamOptions> ReadMessage for R {
348
347
payload : try!( rdr. read_cstr ( ) ) ,
349
348
}
350
349
}
351
- b'c' => Backend :: BCopyDone ,
350
+ b'c' => Backend :: CopyDone ,
352
351
b'C' => Backend :: CommandComplete { tag : try!( rdr. read_cstr ( ) ) } ,
353
352
b'd' => {
354
353
let mut data = vec ! [ ] ;
355
354
try!( rdr. read_to_end ( & mut data) ) ;
356
- Backend :: BCopyData { data : data }
355
+ Backend :: CopyData { data : data }
357
356
}
358
357
b'D' => try!( read_data_row ( & mut rdr) ) ,
359
358
b'E' => Backend :: ErrorResponse { fields : try!( read_fields ( & mut rdr) ) } ,
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ impl<'conn> Statement<'conn> {
154
154
Backend :: CopyOutResponse { .. } => {
155
155
loop {
156
156
match try!( conn. read_message ( ) ) {
157
- Backend :: BCopyDone => break ,
157
+ Backend :: CopyDone => break ,
158
158
Backend :: ErrorResponse { fields } => {
159
159
try!( conn. wait_for_ready ( ) ) ;
160
160
return DbError :: new ( fields) ;
@@ -405,7 +405,7 @@ impl<'conn> Statement<'conn> {
405
405
let count;
406
406
loop {
407
407
match try!( info. conn . read_message ( ) ) {
408
- Backend :: BCopyData { data } => {
408
+ Backend :: CopyData { data } => {
409
409
let mut data = & data[ ..] ;
410
410
while !data. is_empty ( ) {
411
411
match w. write_with_info ( data, & info) {
@@ -420,7 +420,7 @@ impl<'conn> Statement<'conn> {
420
420
}
421
421
}
422
422
}
423
- Backend :: BCopyDone => { }
423
+ Backend :: CopyDone => { }
424
424
Backend :: CommandComplete { tag } => {
425
425
count = parse_update_count ( tag) ;
426
426
break ;
You can’t perform that action at this time.
0 commit comments