about summary refs log tree commit diff
path: root/src/libstd/fs.rs
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-02-01 03:41:58 -0800
committerBrian Anderson <banderson@mozilla.com>2012-02-01 21:56:53 -0800
commit6156bc56cbd1f40e538b59ff91ce9b8d89969ff3 (patch)
treeec399916523a701e8ac25903855e90d2210a9254 /src/libstd/fs.rs
parent47c57a17dc51ff32594b5759c300b84e380b9f7b (diff)
downloadrust-6156bc56cbd1f40e538b59ff91ce9b8d89969ff3.tar.gz
rust-6156bc56cbd1f40e538b59ff91ce9b8d89969ff3.zip
Propagating unsafe::slice 2
Diffstat (limited to 'src/libstd/fs.rs')
-rw-r--r--src/libstd/fs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index cbfca163c18..26a9931a0cb 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -63,7 +63,7 @@ path separators in the path then the returned path is identical to
 the provided path. If an empty path is provided or the path ends
 with a path separator then an empty path is returned.
 */
-fn basename(p: path) -> path {
+fn basename(p: path) -> path unsafe {
     let i: int = str::rindex(p, os_fs::path_sep as u8);
     if i == -1 {
         i = str::rindex(p, os_fs::alt_path_sep as u8);
@@ -71,7 +71,7 @@ fn basename(p: path) -> path {
     }
     let len = str::byte_len(p);
     if i + 1 as uint >= len { ret p; }
-    ret str::slice(p, i + 1 as uint, len);
+    ret str::unsafe::slice(p, i + 1 as uint, len);
 }