Skip to content

Commit dc52f84

Browse files
committed
Fix uuid and eui48
1 parent e40b71a commit dc52f84

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/types/eui48.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ use self::eui48::MacAddress;
66

77
use types::{FromSql, ToSql, Type, IsNull, SessionInfo};
88
use Result;
9-
use util;
109

1110
impl FromSql for MacAddress {
1211
fn from_sql<R: Read>(_: &Type, raw: &mut R, _: &SessionInfo) -> Result<MacAddress> {
1312
let mut bytes = [0; 6];
14-
try!(util::read_all(raw, &mut bytes));
13+
try!(raw.read_exact(&mut bytes));
1514
Ok(MacAddress::new(bytes))
1615
}
1716

src/types/uuid.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ use std::io::prelude::*;
55
use self::uuid::Uuid;
66
use types::{FromSql, ToSql, Type, IsNull, SessionInfo};
77
use Result;
8-
use util;
98

109
impl FromSql for Uuid {
1110
fn from_sql<R: Read>(_: &Type, raw: &mut R, _: &SessionInfo) -> Result<Uuid> {
1211
let mut bytes = [0; 16];
13-
try!(util::read_all(raw, &mut bytes));
12+
try!(raw.read_exact(&mut bytes));
1413
Ok(Uuid::from_bytes(&bytes).unwrap())
1514
}
1615

0 commit comments

Comments
 (0)