From 0c5fdc8745cd0bc5fbf9272301d3aafa2eb8f331 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 8 Mar 2012 15:24:27 -0800 Subject: 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". --- src/libstd/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 6627b0fec21..8a5b88f7480 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -271,7 +271,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 - let ext = "." + vec::last_unsafe(parts); + let ext = "." + vec::last(parts); fn is_dotfile(base: str) -> bool { str::is_empty(base) -- cgit 1.4.1-3-g733a5