diff --git a/lib.rs b/lib.rs index d3a88a4d..6ad72729 100644 --- a/lib.rs +++ b/lib.rs @@ -589,7 +589,8 @@ impl InnerPostgresConnection { ReadyForQuery { .. } => break, DataRow { row } => result.push(row.move_iter().map(|opt| - opt.map(|b| str::from_utf8_owned(b))).collect()), + opt.map(|b| str::from_utf8_owned(b).unwrap())) + .collect()), ErrorResponse { fields } => fail!("Error: {}", PostgresDbError::new(fields).to_str()), diff --git a/message.rs b/message.rs index 2e646191..2f2d588b 100644 --- a/message.rs +++ b/message.rs @@ -245,7 +245,7 @@ impl ReadCStr for R { fn read_cstr(&mut self) -> ~str { let mut buf = self.read_until(0).unwrap(); buf.pop(); - str::from_utf8_owned(buf) + str::from_utf8_owned(buf).unwrap() } } diff --git a/pool.rs b/pool.rs index d45f8139..43d17f64 100644 --- a/pool.rs +++ b/pool.rs @@ -87,7 +87,7 @@ impl PostgresConnectionPool { cvar.wait(); } - pool.pool.pop() + pool.pool.pop().unwrap() }) }; diff --git a/types/mod.rs b/types/mod.rs index 2fcab4ef..efcde043 100644 --- a/types/mod.rs +++ b/types/mod.rs @@ -267,7 +267,7 @@ impl RawFromSql for ~[u8] { impl RawFromSql for ~str { fn raw_from_sql(len: uint, raw: &mut R) -> ~str { - str::from_utf8_owned(raw.read_bytes(len)) + str::from_utf8_owned(raw.read_bytes(len)).unwrap() } } @@ -455,13 +455,13 @@ from_map_impl!(PgUnknownType { name: ~"hstore", .. }, for _ in range(0, count) { let key_len = rdr.read_be_i32(); - let key = str::from_utf8_owned(rdr.read_bytes(key_len as uint)); + let key = str::from_utf8_owned(rdr.read_bytes(key_len as uint)).unwrap(); let val_len = rdr.read_be_i32(); let val = if val_len < 0 { None } else { - Some(str::from_utf8_owned(rdr.read_bytes(val_len as uint))) + Some(str::from_utf8_owned(rdr.read_bytes(val_len as uint)).unwrap()) }; map.insert(key, val);