(&mut self, exception_table: &Vec<ExceptionHandler>)
| 630 | } |
| 631 | |
| 632 | fn write_exception_handlers(&mut self, exception_table: &Vec<ExceptionHandler>) -> Result<usize, Error> { |
| 633 | self.write_u16(exception_table.len() as u16) |
| 634 | .and(exception_table.iter().fold(Ok(0), |_, x| { |
| 635 | self.write_u16(x.start_pc) |
| 636 | .and(self.write_u16(x.end_pc)) |
| 637 | .and(self.write_u16(x.handler_pc)) |
| 638 | .and(self.write_u16(x.catch_type.idx as u16)) |
| 639 | })) |
| 640 | } |
| 641 | |
| 642 | pub fn write_n(&mut self, bytes: &Vec<u8>) -> Result<usize, Error> { |
| 643 | bytes.iter().fold(Ok(0), |acc, x| match acc { |
no test coverage detected