Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
simplify RefInfo fmt (#7929)
Browse files Browse the repository at this point in the history
  • Loading branch information
debris authored and andresilva committed Feb 19, 2018
1 parent 684322c commit d6d6a7c
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions util/journaldb/src/earlymergedb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

//! Disk-backed `HashDB` implementation.
use std::fmt;
use std::collections::HashMap;
use std::collections::hash_map::Entry;
use std::sync::Arc;
Expand All @@ -32,7 +31,7 @@ use ethereum_types::H256;
use error::{BaseDataError, UtilError};
use bytes::Bytes;

#[derive(Clone, PartialEq, Eq)]
#[derive(Debug, Clone, PartialEq, Eq)]
struct RefInfo {
queue_refs: usize,
in_archive: bool,
Expand All @@ -42,18 +41,6 @@ impl HeapSizeOf for RefInfo {
fn heap_size_of_children(&self) -> usize { 0 }
}

impl fmt::Display for RefInfo {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}+{}", self.queue_refs, if self.in_archive {1} else {0})
}
}

impl fmt::Debug for RefInfo {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}+{}", self.queue_refs, if self.in_archive {1} else {0})
}
}

#[derive(Clone, PartialEq, Eq)]
enum RemoveFrom {
Queue,
Expand Down

0 comments on commit d6d6a7c

Please sign in to comment.