mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 01:28:21 -05:00
chore: mem take topics when converting logs (#7048)
This commit is contained in:
@@ -22,8 +22,12 @@ pub struct Log {
|
||||
}
|
||||
|
||||
impl From<AlloyLog> for Log {
|
||||
fn from(log: AlloyLog) -> Self {
|
||||
Self { address: log.address, topics: log.topics().to_vec(), data: log.data.data }
|
||||
fn from(mut log: AlloyLog) -> Self {
|
||||
Self {
|
||||
address: log.address,
|
||||
topics: std::mem::take(log.data.topics_mut_unchecked()),
|
||||
data: log.data.data,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user