(&self, vm: &VirtualMachine)
| 699 | } |
| 700 | |
| 701 | fn result(&self, vm: &VirtualMachine) -> PyResult<PyDialect> { |
| 702 | match &self.dialect { |
| 703 | DialectItem::Str(name) => { |
| 704 | let g = GLOBAL_HASHMAP.lock(); |
| 705 | if let Some(dialect) = g.get(name) { |
| 706 | Ok(self.update_py_dialect(*dialect)) |
| 707 | } else { |
| 708 | Err(new_csv_error(vm, format!("{name} is not registered."))) |
| 709 | } |
| 710 | // TODO |
| 711 | // Maybe need to update the obj from HashMap |
| 712 | } |
| 713 | DialectItem::Obj(o) => Ok(self.update_py_dialect(*o)), |
| 714 | DialectItem::None => { |
| 715 | let g = GLOBAL_HASHMAP.lock(); |
| 716 | let res = *g.get("excel").unwrap(); |
| 717 | Ok(self.update_py_dialect(res)) |
| 718 | } |
| 719 | } |
| 720 | } |
| 721 | fn get_skipinitialspace(&self) -> bool { |
| 722 | let mut skipinitialspace = match &self.dialect { |
| 723 | DialectItem::Str(name) => { |
no test coverage detected