use slicing sugar

This commit is contained in:
Jorge Aparicio 2015-01-07 11:58:31 -05:00
parent 6e2bfe4ae8
commit 517f1cc63c
198 changed files with 2383 additions and 2405 deletions

View file

@ -203,7 +203,7 @@ impl Encodable for Ident {
impl Decodable for Ident {
fn decode<D: Decoder>(d: &mut D) -> Result<Ident, D::Error> {
Ok(str_to_ident(try!(d.read_str()).index(&FullRange)))
Ok(str_to_ident(&try!(d.read_str())[]))
}
}