mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 03:31:45 +00:00
chore: change impl Into<T> for U to impl From<U> for T (#5948)
* chore: Change Into trait impl for KzgProof to From trait impl * chore: change `impl Into <T> for U` to `impl From<U> for T` * chore: remove `from-over-into` clippy lint exception
This commit is contained in:
@@ -145,24 +145,24 @@ impl TryInto<ProtoNode> for ProtoNodeV16 {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<ProtoNodeV16> for ProtoNode {
|
||||
fn into(self) -> ProtoNodeV16 {
|
||||
impl From<ProtoNode> for ProtoNodeV16 {
|
||||
fn from(from: ProtoNode) -> ProtoNodeV16 {
|
||||
ProtoNodeV16 {
|
||||
slot: self.slot,
|
||||
state_root: self.state_root,
|
||||
target_root: self.target_root,
|
||||
current_epoch_shuffling_id: self.current_epoch_shuffling_id,
|
||||
next_epoch_shuffling_id: self.next_epoch_shuffling_id,
|
||||
root: self.root,
|
||||
parent: self.parent,
|
||||
justified_checkpoint: Some(self.justified_checkpoint),
|
||||
finalized_checkpoint: Some(self.finalized_checkpoint),
|
||||
weight: self.weight,
|
||||
best_child: self.best_child,
|
||||
best_descendant: self.best_descendant,
|
||||
execution_status: self.execution_status,
|
||||
unrealized_justified_checkpoint: self.unrealized_justified_checkpoint,
|
||||
unrealized_finalized_checkpoint: self.unrealized_finalized_checkpoint,
|
||||
slot: from.slot,
|
||||
state_root: from.state_root,
|
||||
target_root: from.target_root,
|
||||
current_epoch_shuffling_id: from.current_epoch_shuffling_id,
|
||||
next_epoch_shuffling_id: from.next_epoch_shuffling_id,
|
||||
root: from.root,
|
||||
parent: from.parent,
|
||||
justified_checkpoint: Some(from.justified_checkpoint),
|
||||
finalized_checkpoint: Some(from.finalized_checkpoint),
|
||||
weight: from.weight,
|
||||
best_child: from.best_child,
|
||||
best_descendant: from.best_descendant,
|
||||
execution_status: from.execution_status,
|
||||
unrealized_justified_checkpoint: from.unrealized_justified_checkpoint,
|
||||
unrealized_finalized_checkpoint: from.unrealized_finalized_checkpoint,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user