1
Fork 0

Rename last_total to last_unsafe

See Issue 1943 for any discussion (reopen it if necessary).

Closes #1943
This commit is contained in:
Tim Chevalier 2012-03-08 12:08:47 -08:00
parent c9cf73f0a8
commit ebc1d3e704
7 changed files with 21 additions and 11 deletions

View file

@ -270,7 +270,8 @@ fn splitext(p: path) -> (str, str) {
let parts = str::split_char(p, '.');
if vec::len(parts) > 1u {
let base = str::connect(vec::init(parts), ".");
let ext = "." + vec::last_total(parts);
// We just checked that parts is non-empty
let ext = "." + vec::last_unsafe(parts);
fn is_dotfile(base: str) -> bool {
str::is_empty(base)