diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-07-24 15:29:31 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-07-24 15:29:31 +0200 |
| commit | 86d0e9e1c765f434cc31933a970d1c1c1cfebea7 (patch) | |
| tree | 80c1757df0ca4b44ac446b907e3a45db560a15d8 /src/librustc_data_structures/bitslice.rs | |
| parent | baba5007bf857b4577a8d26de454a03d7afef3ac (diff) | |
| download | rust-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.rs | 3 |
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; |
