about summary refs log tree commit diff
path: root/src/librustc_data_structures/bitslice.rs
diff options
context:
space:
mode:
authorljedrz <ljedrz@gmail.com>2018-07-24 15:29:31 +0200
committerljedrz <ljedrz@gmail.com>2018-07-24 15:29:31 +0200
commit86d0e9e1c765f434cc31933a970d1c1c1cfebea7 (patch)
tree80c1757df0ca4b44ac446b907e3a45db560a15d8 /src/librustc_data_structures/bitslice.rs
parentbaba5007bf857b4577a8d26de454a03d7afef3ac (diff)
downloadrust-86d0e9e1c765f434cc31933a970d1c1c1cfebea7.tar.gz
rust-86d0e9e1c765f434cc31933a970d1c1c1cfebea7.zip
Simplify a few functions in rustc_data_structures
Diffstat (limited to 'src/librustc_data_structures/bitslice.rs')
-rw-r--r--src/librustc_data_structures/bitslice.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustc_data_structures/bitslice.rs b/src/librustc_data_structures/bitslice.rs
index 79435aa3987..b8f191c2f57 100644
--- a/src/librustc_data_structures/bitslice.rs
+++ b/src/librustc_data_structures/bitslice.rs
@@ -95,8 +95,7 @@ pub fn bits_to_string(words: &[Word], bits: usize) -> String {
             assert!(mask <= 0xFF);
             let byte = v & mask;
 
-            result.push(sep);
-            result.push_str(&format!("{:02x}", byte));
+            result.push_str(&format!("{}{:02x}", sep, byte));
 
             if remain <= 8 { break; }
             v >>= 8;