auto merge of #16291 : nham/rust/byte_literals, r=alexcrichton

This replaces many instances chars being casted to u8 with byte literals.
This commit is contained in:
bors
2014-08-06 23:41:05 +00:00
26 changed files with 131 additions and 134 deletions

View File

@@ -293,7 +293,7 @@ pub fn env_as_bytes() -> Vec<(Vec<u8>,Vec<u8>)> {
fn env_convert(input: Vec<Vec<u8>>) -> Vec<(Vec<u8>, Vec<u8>)> {
let mut pairs = Vec::new();
for p in input.iter() {
let mut it = p.as_slice().splitn(1, |b| *b == '=' as u8);
let mut it = p.as_slice().splitn(1, |b| *b == b'=');
let key = Vec::from_slice(it.next().unwrap());
let val = Vec::from_slice(it.next().unwrap_or(&[]));
pairs.push((key, val));