Compare commits

...

2 Commits

Author SHA1 Message Date
Dennis Schwerdel 70109eeb51 Removed one unneeded unsafe block 2019-12-05 18:29:12 +01:00
Dennis Schwerdel 8fcd800d56 Changed base image for builders 2019-12-05 18:28:49 +01:00
3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
FROM debian:stable FROM ubuntu:16.04
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:latest FROM centos:7
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 v = Vec::with_capacity(bytes.len() * 2); let mut s = String::with_capacity(bytes.len() * 2);
for &byte in bytes { for &byte in bytes {
v.push(HEX_CHARS[(byte >> 4) as usize]); s.push(HEX_CHARS[(byte >> 4) as usize] as char);
v.push(HEX_CHARS[(byte & 0xf) as usize]); s.push(HEX_CHARS[(byte & 0xf) as usize] as char);
} }
unsafe { String::from_utf8_unchecked(v) } s
} }