Migrates the report to the latest version. Fails if the report version is newer than supported.
(&mut self)
| 62 | /// Migrates the report to the latest version. |
| 63 | /// Fails if the report version is newer than supported. |
| 64 | pub fn migrate(&mut self) -> Result<()> { |
| 65 | if self.version == 0 { |
| 66 | self.migrate_v0()?; |
| 67 | } |
| 68 | if self.version == 1 { |
| 69 | self.migrate_v1()?; |
| 70 | } |
| 71 | if self.version != REPORT_VERSION { |
| 72 | bail!("Unsupported report version: {}", self.version); |
| 73 | } |
| 74 | Ok(()) |
| 75 | } |
| 76 | |
| 77 | /// Adds `complete_code`, `complete_data`, `complete_code_percent`, and `complete_data_percent` |
| 78 | /// to measures, and sets `progress_categories` in unit metadata. |
nothing calls this directly
no test coverage detected