@@ -85,12 +85,15 @@ impl From<gateway_messages::UpdatePreparationProgress>
8585 }
8686}
8787
88- // This type is a duplicate of the type in `ipcc`, and we provide a
89- // `From<_>` impl to convert to it. We keep these types distinct to allow us to
90- // choose different representations for MGS's HTTP API (this type) and the wire
91- // format passed through the SP to installinator
92- // (`ipcc::InstallinatorImageId`), although _currently_ they happen to
93- // be defined identically.
88+ // This type is a duplicate of the type in `ipcc`. We keep these types distinct
89+ // to allow us to choose different representations for MGS's HTTP API (this
90+ // type) and the wire format passed through the SP to installinator
91+ // (`ipcc::InstallinatorImageId`), although _currently_ they happen to be
92+ // defined identically.
93+ //
94+ // We don't define a conversion from `Self` to `ipcc::InstallinatorImageId` here
95+ // to avoid a dependency on `libipcc`. Instead, callers can easily perform
96+ // conversions themselves.
9497#[ derive(
9598 Debug , Clone , Copy , PartialEq , Eq , Serialize , Deserialize , JsonSchema ,
9699) ]
@@ -101,16 +104,6 @@ pub struct InstallinatorImageId {
101104 pub control_plane : ArtifactHash ,
102105}
103106
104- impl From < InstallinatorImageId > for ipcc:: InstallinatorImageId {
105- fn from ( id : InstallinatorImageId ) -> Self {
106- Self {
107- update_id : id. update_id ,
108- host_phase_2 : id. host_phase_2 ,
109- control_plane : id. control_plane ,
110- }
111- }
112- }
113-
114107#[ derive( Debug , Clone , PartialEq , Eq , Serialize , Deserialize , JsonSchema ) ]
115108#[ serde( tag = "progress" , rename_all = "snake_case" ) ]
116109pub enum HostPhase2Progress {
0 commit comments