Skip to content

Commit 650a030

Browse files
committed
Less sketchy shift
1 parent 8516d84 commit 650a030

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lib.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -454,10 +454,8 @@ impl InnerPostgresConnection {
454454
args.push((~"user", user.user.clone()));
455455
if !path.is_empty() {
456456
// path contains the leading /
457-
let mut path = StrBuf::from_owned_str(path);
458-
// FIXME
459-
unsafe { path.shift_byte(); }
460-
args.push((~"database", path.into_owned()));
457+
let (_, path) = path.slice_shift_char();
458+
args.push((~"database", path.to_owned()));
461459
}
462460
try_pg_conn!(conn.write_messages([StartupMessage {
463461
version: message::PROTOCOL_VERSION,

0 commit comments

Comments
 (0)