s/with_instruction_capacity/with_capacity

This commit is contained in:
Sergey Pepyakin 2019-04-17 18:20:46 +02:00
parent cd34cc6afb
commit 8a654554d1
1 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ impl FuncValidator for Compiler {
fn new(_ctx: &FunctionValidationContext, body: &FuncBody) -> Self { fn new(_ctx: &FunctionValidationContext, body: &FuncBody) -> Self {
let code_len = body.code().elements().len(); let code_len = body.code().elements().len();
let mut compiler = Compiler { let mut compiler = Compiler {
sink: Sink::with_instruction_capacity(code_len), sink: Sink::with_capacity(code_len),
label_stack: Vec::new(), label_stack: Vec::new(),
}; };
@ -1108,7 +1108,7 @@ struct Sink {
} }
impl Sink { impl Sink {
fn with_instruction_capacity(capacity: usize) -> Sink { fn with_capacity(capacity: usize) -> Sink {
Sink { Sink {
ins: isa::Instructions::with_capacity(capacity), ins: isa::Instructions::with_capacity(capacity),
labels: Vec::new(), labels: Vec::new(),