Rename last_total to last_unsafe
See Issue 1943 for any discussion (reopen it if necessary). Closes #1943
This commit is contained in:
parent
c9cf73f0a8
commit
ebc1d3e704
7 changed files with 21 additions and 11 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue