language changes: str::shift_slice_char has been updated.

This commit is contained in:
Kang Seonghoon 2014-11-20 13:09:16 +09:00
parent ec6c874042
commit e947b4eec6
1 changed files with 4 additions and 1 deletions

View File

@ -43,7 +43,10 @@ fn format(w: &mut Writer, date: Option<&NaiveDate>, time: Option<&NaiveTime>,
continue;
}
let (head, tail) = part.slice_shift_char();
let (head, tail) = match part.slice_shift_char() {
Some((head, tail)) => (Some(head), tail),
None => (None, ""),
};
match (head, date, time, off) {
// year
(Some('Y'), Some(d), _, _) => try!(write!(w, "{}", d.year())),