Skip to content

Commit 5f65010

Browse files
committed
Update for API changes
1 parent 10e9bfa commit 5f65010

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,8 @@ impl InnerPostgresConnection {
589589
ReadyForQuery { .. } => break,
590590
DataRow { row } =>
591591
result.push(row.move_iter().map(|opt|
592-
opt.map(|b| str::from_utf8_owned(b))).collect()),
592+
opt.map(|b| str::from_utf8_owned(b).unwrap()))
593+
.collect()),
593594
ErrorResponse { fields } =>
594595
fail!("Error: {}",
595596
PostgresDbError::new(fields).to_str()),

message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ impl<R: Buffer> ReadCStr for R {
245245
fn read_cstr(&mut self) -> ~str {
246246
let mut buf = self.read_until(0).unwrap();
247247
buf.pop();
248-
str::from_utf8_owned(buf)
248+
str::from_utf8_owned(buf).unwrap()
249249
}
250250
}
251251

pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl PostgresConnectionPool {
8787
cvar.wait();
8888
}
8989

90-
pool.pool.pop()
90+
pool.pool.pop().unwrap()
9191
})
9292
};
9393

types/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl RawFromSql for ~[u8] {
267267

268268
impl RawFromSql for ~str {
269269
fn raw_from_sql<R: Reader>(len: uint, raw: &mut R) -> ~str {
270-
str::from_utf8_owned(raw.read_bytes(len))
270+
str::from_utf8_owned(raw.read_bytes(len)).unwrap()
271271
}
272272
}
273273

@@ -455,13 +455,13 @@ from_map_impl!(PgUnknownType { name: ~"hstore", .. },
455455
456456
for _ in range(0, count) {
457457
let key_len = rdr.read_be_i32();
458-
let key = str::from_utf8_owned(rdr.read_bytes(key_len as uint));
458+
let key = str::from_utf8_owned(rdr.read_bytes(key_len as uint)).unwrap();
459459
460460
let val_len = rdr.read_be_i32();
461461
let val = if val_len < 0 {
462462
None
463463
} else {
464-
Some(str::from_utf8_owned(rdr.read_bytes(val_len as uint)))
464+
Some(str::from_utf8_owned(rdr.read_bytes(val_len as uint)).unwrap())
465465
};
466466
467467
map.insert(key, val);

0 commit comments

Comments
 (0)