Compare commits

..

No commits in common. "70109eeb51d1ab51f352ae8836894add99e65ae8" and "50058e60d015a809ef954813a243f71336e29b57" have entirely different histories.

3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
FROM ubuntu:16.04 FROM debian:stable
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \

View File

@ -1,4 +1,4 @@
FROM centos:7 FROM centos:latest
RUN yum groupinstall -y 'Development Tools' RUN yum groupinstall -y 'Development Tools'

View File

@ -25,12 +25,12 @@ pub type Time = i64;
const HEX_CHARS: &[u8] = b"0123456789abcdef"; const HEX_CHARS: &[u8] = b"0123456789abcdef";
pub fn bytes_to_hex(bytes: &[u8]) -> String { pub fn bytes_to_hex(bytes: &[u8]) -> String {
let mut s = String::with_capacity(bytes.len() * 2); let mut v = Vec::with_capacity(bytes.len() * 2);
for &byte in bytes { for &byte in bytes {
s.push(HEX_CHARS[(byte >> 4) as usize] as char); v.push(HEX_CHARS[(byte >> 4) as usize]);
s.push(HEX_CHARS[(byte & 0xf) as usize] as char); v.push(HEX_CHARS[(byte & 0xf) as usize]);
} }
s unsafe { String::from_utf8_unchecked(v) }
} }