This repository was archived by the owner on Oct 10, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-21
lines changed
postgres-derive-internals/src Expand file tree Collapse file tree 2 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,8 @@ fn composite_body(ident: &Ident, fields: &[Field]) -> String {
145
145
if oid != field.type_().oid() {{
146
146
return ::std::result::Result::Err(
147
147
::std::convert::Into::into(\" unexpected OID\" ));
148
- }}\
149
- \
148
+ }}
149
+
150
150
match field.name() {{" ) . unwrap ( ) ;
151
151
152
152
for field in fields {
Original file line number Diff line number Diff line change @@ -127,25 +127,25 @@ fn composite_body(fields: &[Field]) -> String {
127
127
field. name, field. ident) . unwrap ( ) ;
128
128
}
129
129
130
- write ! ( out, "\
131
- _ => unreachable!(),\
132
- }};\
133
- \
134
- let count = match try!(r) {{\
135
- ::postgres::types::IsNull::Yes => -1,\
136
- ::postgres::types::IsNull::No => {{\
137
- let len = buf.len() - base - 4;\
138
- if len > i32::max_value() as usize {{\
139
- return ::std::result::Result::Err(\
140
- ::std::convert::Into::into(\" value too large to transmit\" ));\
141
- }}\
142
- len as i32\
143
- }}\
144
- }};\
145
- \
146
- try!(write_be_i32(&mut &mut buf[base..base + 4], count));\
147
- }}\
148
- \
130
+ write ! ( out, "
131
+ _ => unreachable!(),
132
+ }};
133
+
134
+ let count = match try!(r) {{
135
+ ::postgres::types::IsNull::Yes => -1,
136
+ ::postgres::types::IsNull::No => {{
137
+ let len = buf.len() - base - 4;
138
+ if len > i32::max_value() as usize {{
139
+ return ::std::result::Result::Err(
140
+ ::std::convert::Into::into(\" value too large to transmit\" ));
141
+ }}
142
+ len as i32
143
+ }}
144
+ }};
145
+
146
+ try!(write_be_i32(&mut &mut buf[base..base + 4], count));
147
+ }}
148
+
149
149
::std::result::Result::Ok(::postgres::types::IsNull::No)" ) . unwrap ( ) ;
150
150
151
151
out
You can’t perform that action at this time.
0 commit comments