From 8984242373d1317494f32e8f7326ac7d8fd52006 Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Thu, 28 Jan 2016 15:18:42 +0100 Subject: [PATCH] Fix `make tidy` and name what is being computed --- src/libcore/char.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcore/char.rs b/src/libcore/char.rs index c97d7b086f4d..1b2083929ceb 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -470,7 +470,8 @@ impl Iterator for EscapeUnicode { Some('{') } EscapeUnicodeState::Value => { - let c = from_digit(((self.c as u32) >> (self.hex_digit_idx * 4)) & 0xf, 16).unwrap(); + let hex_digit = ((self.c as u32) >> (self.hex_digit_idx * 4)) & 0xf; + let c = from_digit(hex_digit, 16).unwrap(); if self.hex_digit_idx == 0 { self.state = EscapeUnicodeState::RightBrace; } else {