MCPcopy Index your code
hub / github.com/encounter/objdiff / migrate

Method migrate

objdiff-core/src/bindings/report.rs:64–75  ·  view source on GitHub ↗

Migrates the report to the latest version. Fails if the report version is newer than supported.

(&mut self)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

migrate_v0Method · 0.80
migrate_v1Method · 0.80

Tested by

no test coverage detected