Skip to content

Commit deeba1b

Browse files
committed
Fix for str API changes
1 parent aab49e8 commit deeba1b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

types/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ from_conversions_impl!(PgFloat8, f64, read_be_f64)
269269
from_option_impl!(f64)
270270

271271
from_map_impl!(PgVarchar | PgText | PgCharN, ~str, |buf| {
272-
str::from_utf8(buf.as_slice())
272+
str::from_utf8_owned(buf.clone())
273273
})
274274
from_option_impl!(~str)
275275

@@ -279,7 +279,7 @@ from_map_impl!(PgByteA, ~[u8], |buf| {
279279
from_option_impl!(~[u8])
280280

281281
from_map_impl!(PgJson, Json, |buf| {
282-
json::from_str(str::from_utf8_slice(buf.as_slice())).unwrap()
282+
json::from_str(str::from_utf8(buf.as_slice())).unwrap()
283283
})
284284
from_option_impl!(Json)
285285

0 commit comments

Comments
 (0)