1
Fork 0

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".
This commit is contained in:
Tim Chevalier 2012-03-08 15:24:27 -08:00
parent 8047c0cd68
commit 0c5fdc8745
13 changed files with 30 additions and 31 deletions

View file

@ -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)