Use slices rather than Vec borrows.

https://github.com/rust-lang-nursery/rust-clippy/wiki#ptr_arg
This commit is contained in:
Dan Gohman
2017-08-10 14:18:27 -07:00
parent 01744d6f65
commit 03698f6bc8
3 changed files with 13 additions and 13 deletions

View File

@@ -224,7 +224,7 @@ pub fn parse_global_section(parser: &mut Parser,
pub fn parse_data_section(parser: &mut Parser,
runtime: &mut WasmRuntime,
globals: &Vec<Global>)
globals: &[Global])
-> Result<(), SectionParsingError> {
loop {
let memory_index = match *parser.read() {
@@ -314,7 +314,7 @@ pub fn parse_table_section(parser: &mut Parser,
/// Retrieves the tables from the table section
pub fn parse_elements_section(parser: &mut Parser,
runtime: &mut WasmRuntime,
globals: &Vec<Global>)
globals: &[Global])
-> Result<(), SectionParsingError> {
loop {
let table_index = match *parser.read() {