remove unnecessary-struct-initialization (#31486)

* remove unnecessary-struct-initialization

* more  remove unnecessary-struct-initialization

---------

Co-authored-by: haoran <haoran.yi@solana.com>
This commit is contained in:
HaoranYi 2023-05-04 17:48:33 -05:00 committed by GitHub
parent f8bdeb8d05
commit 0f4293914c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -142,7 +142,7 @@ struct LeaderSlotPacketCountMetrics {
impl LeaderSlotPacketCountMetrics {
fn new() -> Self {
Self { ..Self::default() }
Self::default()
}
fn report(&self, id: u32, slot: Slot) {
@ -330,7 +330,7 @@ pub(crate) struct VotePacketCountMetrics {
impl VotePacketCountMetrics {
fn new() -> Self {
Self { ..Self::default() }
Self::default()
}
fn report(&self, id: u32, slot: Slot) {

View File

@ -28,7 +28,7 @@ pub struct TransactionErrorMetrics {
impl TransactionErrorMetrics {
pub fn new() -> Self {
Self { ..Self::default() }
Self::default()
}
pub fn accumulate(&mut self, other: &TransactionErrorMetrics) {