Skip to content

Commit

Permalink
updated the fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
harrydevnull committed Mar 24, 2017
1 parent 4f7d0f8 commit ee83c84
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/frame/frame_result.rs
Expand Up @@ -190,7 +190,7 @@ impl BodyResResultRows {
-> Vec<Vec<CBytes>> {
(0..rows_count)
.map(|_| {
(0..columns_count)
(0..columns_count)
.map(|_| CBytes::from_cursor(&mut cursor) as CBytes)
.collect()
})
Expand Down Expand Up @@ -439,9 +439,8 @@ impl FromBytes for ColType {

impl FromCursor for ColType {
fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> ColType {
ColType::from_bytes(cursor_next_value(&mut cursor, SHORT_LEN as u64)
.as_slice())

ColType::from_bytes(cursor_next_value(&mut cursor, SHORT_LEN as u64).as_slice())

}
}

Expand Down
2 changes: 1 addition & 1 deletion src/types/data_serialization_types.rs
Expand Up @@ -105,7 +105,7 @@ pub fn decode_inet(bytes: &[u8]) -> Result<net::IpAddr, io::Error> {
let h = from_u16_bytes(&bytes[14..16]);
Ok(net::IpAddr::V6(net::Ipv6Addr::new(a, b, c, d, e, f, g, h)))
}
_ => Err(io::Error::new(io::ErrorKind::Other, "Unparseable Ip address")),
_ => Err(io::Error::new(io::ErrorKind::Other, "Unparseable Ip address")),
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/types/udt.rs
Expand Up @@ -29,13 +29,13 @@ impl UDT {
a
});

UDT { data: d }
UDT { data: d }
}
}

impl IntoRustByName<Vec<u8>> for UDT {
fn get_by_name(&self, name: &str) -> Option<Result<Vec<u8>>> {
self.data.get(name).map(|v| {
self.data.get(name).map(|v| {
let &(ref col_type, ref bytes) = v;

match col_type.id {
Expand Down

0 comments on commit ee83c84

Please sign in to comment.