mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
rustfmt
This commit is contained in:
parent
f5ae49f071
commit
282a5ce980
1 changed files with 8 additions and 3 deletions
|
@ -137,13 +137,18 @@ impl TableViewItem<DiffColumn> for DiffBlock {
|
|||
|
||||
match column {
|
||||
DiffColumn::Height => self.block_height.to_string(),
|
||||
DiffColumn::Hash => { // Prints part of the hash's hex
|
||||
DiffColumn::Hash => {
|
||||
// Prints part of the hash's hex
|
||||
let hash_hex = self.block_hash.to_hex();
|
||||
let len = hash_hex.len();
|
||||
const NUM_SHOW: usize = 8; // Number of characters to show
|
||||
|
||||
format!("{}...{}", &hash_hex[..NUM_SHOW / 2], &hash_hex[(len - NUM_SHOW)..])
|
||||
},
|
||||
format!(
|
||||
"{}...{}",
|
||||
&hash_hex[..NUM_SHOW / 2],
|
||||
&hash_hex[(len - NUM_SHOW)..]
|
||||
)
|
||||
}
|
||||
DiffColumn::PoWType => pow_type,
|
||||
DiffColumn::Difficulty => self.difficulty.to_string(),
|
||||
DiffColumn::SecondaryScaling => self.secondary_scaling.to_string(),
|
||||
|
|
Loading…
Reference in a new issue