Replace Builder's Vec<u8> with a Box<[u8]>.

It doesn't need to dynamically grow, and `Box<[u8]>` is smaller.
This commit is contained in:
Dan Gohman
2018-04-30 13:45:57 -07:00
parent f4fe438bae
commit b7f38ac8bc

View File

@@ -24,7 +24,7 @@ use constant_hash::{probe, simple_hash};
use isa::TargetIsa;
use std::fmt;
use std::result;
use std::vec::Vec;
use std::boxed::Box;
use std::str;
/// A string-based configurator for settings groups.
@@ -46,7 +46,7 @@ pub trait Configurable {
/// Collect settings values based on a template.
pub struct Builder {
template: &'static detail::Template,
bytes: Vec<u8>,
bytes: Box<[u8]>,
}
impl Builder {