Skip to content
This repository was archived by the owner on Oct 10, 2019. It is now read-only.

Commit 7bc9085

Browse files
committed
Cleanup
1 parent d0f50fe commit 7bc9085

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

postgres-derive-internals/src/fromsql.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ fn composite_body(ident: &Ident, fields: &[Field]) -> String {
145145
if oid != field.type_().oid() {{
146146
return ::std::result::Result::Err(
147147
::std::convert::Into::into(\"unexpected OID\"));
148-
}}\
149-
\
148+
}}
149+
150150
match field.name() {{").unwrap();
151151

152152
for field in fields {

postgres-derive-internals/src/tosql.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -127,25 +127,25 @@ fn composite_body(fields: &[Field]) -> String {
127127
field.name, field.ident).unwrap();
128128
}
129129

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+
149149
::std::result::Result::Ok(::postgres::types::IsNull::No)").unwrap();
150150

151151
out

0 commit comments

Comments
 (0)