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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user