Fix typo in to_digit
auto merge of #10225 : Jurily/rust/master, r=alexcrichton