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:
kevaundray
2024-06-19 06:02:26 +01:00
committed by GitHub
parent 9f8aa963b1
commit a87f19d801
20 changed files with 120 additions and 121 deletions

View File

@@ -1700,11 +1700,11 @@ impl<E: EthSpec> ForkVersionDeserialize for FullBlockContents<E> {
}
}
impl<E: EthSpec> Into<BeaconBlock<E>> for FullBlockContents<E> {
fn into(self) -> BeaconBlock<E> {
match self {
Self::BlockContents(block_and_sidecars) => block_and_sidecars.block,
Self::Block(block) => block,
impl<E: EthSpec> From<FullBlockContents<E>> for BeaconBlock<E> {
fn from(from: FullBlockContents<E>) -> BeaconBlock<E> {
match from {
FullBlockContents::<E>::BlockContents(block_and_sidecars) => block_and_sidecars.block,
FullBlockContents::<E>::Block(block) => block,
}
}
}