about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-02-11 23:49:03 -0800
committerKevin Cantu <me@kevincantu.org>2012-02-12 15:30:20 -0800
commit944f5a65983e929f63c9867c3e635997f89cbe85 (patch)
tree124225ae4cddcca1d250c991bc9b95ad3a913431 /src/libstd
parent5fb0906f43f1b684aec610581da0d7c93948de37 (diff)
downloadrust-944f5a65983e929f63c9867c3e635997f89cbe85.tar.gz
rust-944f5a65983e929f63c9867c3e635997f89cbe85.zip
(core::str) move push_byte, push_bytes, pop_byte, and shift_byte into str::unsafe
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fs.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index de4789fdd39..c367e590d39 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -89,14 +89,14 @@ any leading path separator on `post`, and returns the concatenation of the two
 with a single path separator between them.
 */
 
-fn connect(pre: path, post: path) -> path {
+fn connect(pre: path, post: path) -> path unsafe {
     let pre_ = pre;
     let post_ = post;
     let sep = os_fs::path_sep as u8;
     let pre_len = str::byte_len(pre);
     let post_len = str::byte_len(post);
-    if pre_len > 1u && pre[pre_len-1u] == sep { str::pop_byte(pre_); }
-    if post_len > 1u && post[0] == sep { str::shift_byte(post_); }
+    if pre_len > 1u && pre[pre_len-1u] == sep { str::unsafe::pop_byte(pre_); }
+    if post_len > 1u && post[0] == sep { str::unsafe::shift_byte(post_); }
     ret pre_ + path_sep() + post_;
 }