about summary refs log tree commit diff
path: root/src/libcore/path.rs
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-03-08 15:24:27 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-03-08 15:25:56 -0800
commit0c5fdc8745cd0bc5fbf9272301d3aafa2eb8f331 (patch)
tree9c41d534de15987872229a6e7a915a3be23cb3d3 /src/libcore/path.rs
parent8047c0cd68baaee21ac89ac7d933bc84b7ebcf3e (diff)
downloadrust-0c5fdc8745cd0bc5fbf9272301d3aafa2eb8f331.tar.gz
rust-0c5fdc8745cd0bc5fbf9272301d3aafa2eb8f331.zip
Rename last to last_opt, last_unsafe to last
As per discussion on IRC. I am about to file an RFC for further
discussion about the more general issue of whether to enforce
invariants through types, typestate, or dynamic checks, but for now,
removing the misleading name "last_unsafe".
Diffstat (limited to 'src/libcore/path.rs')
-rw-r--r--src/libcore/path.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/path.rs b/src/libcore/path.rs
index 1cfafd25740..5658e57f68a 100644
--- a/src/libcore/path.rs
+++ b/src/libcore/path.rs
@@ -170,7 +170,7 @@ fn splitext(p: path) -> (str, str) {
         if vec::len(parts) > 1u {
             let base = str::connect(vec::init(parts), ".");
             // We just checked that parts is non-empty, so this is safe
-            let ext = "." + vec::last_unsafe(parts);
+            let ext = "." + vec::last(parts);
 
             fn is_dotfile(base: str) -> bool {
                 str::is_empty(base)