diff --git a/car-mirror/src/common.rs b/car-mirror/src/common.rs index ef48acc..6ede3e5 100644 --- a/car-mirror/src/common.rs +++ b/car-mirror/src/common.rs @@ -243,14 +243,14 @@ impl From for ReceiverState { } } -impl Into for ReceiverState { - fn into(self) -> PushResponse { +impl From for PushResponse { + fn from(receiver_state: ReceiverState) -> PushResponse { let ReceiverState { missing_subgraph_roots, have_cids_bloom, - } = self; + } = receiver_state; - let (bloom_k, bloom) = Self::bloom_serialize(have_cids_bloom); + let (bloom_k, bloom) = ReceiverState::bloom_serialize(have_cids_bloom); PushResponse { subgraph_roots: missing_subgraph_roots, @@ -260,14 +260,14 @@ impl Into for ReceiverState { } } -impl Into for ReceiverState { - fn into(self) -> PullRequest { +impl From for PullRequest { + fn from(receiver_state: ReceiverState) -> PullRequest { let ReceiverState { missing_subgraph_roots, have_cids_bloom, - } = self; + } = receiver_state; - let (bloom_k, bloom) = Self::bloom_serialize(have_cids_bloom); + let (bloom_k, bloom) = ReceiverState::bloom_serialize(have_cids_bloom); PullRequest { resources: missing_subgraph_roots,