xfer
This commit is contained in:
		@@ -52,8 +52,8 @@ impl TableViewItem<PeerTableColumn> for PeerTableData {
 | 
			
		||||
        match column {
 | 
			
		||||
            PeerTableColumn::NodeId => self
 | 
			
		||||
                .node_ids
 | 
			
		||||
                .best()
 | 
			
		||||
                .map(|n| n.value.encode())
 | 
			
		||||
                .first()
 | 
			
		||||
                .cloned()
 | 
			
		||||
                .unwrap_or_else(|| "???".to_owned()),
 | 
			
		||||
            PeerTableColumn::Address => format!(
 | 
			
		||||
                "{:?}:{}",
 | 
			
		||||
@@ -78,21 +78,7 @@ impl TableViewItem<PeerTableColumn> for PeerTableData {
 | 
			
		||||
        Self: Sized,
 | 
			
		||||
    {
 | 
			
		||||
        match column {
 | 
			
		||||
            PeerTableColumn::NodeId => {
 | 
			
		||||
                let n1 = self
 | 
			
		||||
                    .node_ids
 | 
			
		||||
                    .best()
 | 
			
		||||
                    .map(|n| n.value.encode())
 | 
			
		||||
                    .unwrap_or_else(|| "???".to_owned());
 | 
			
		||||
 | 
			
		||||
                let n2 = other
 | 
			
		||||
                    .node_ids
 | 
			
		||||
                    .best()
 | 
			
		||||
                    .map(|n| n.value.encode())
 | 
			
		||||
                    .unwrap_or_else(|| "???".to_owned());
 | 
			
		||||
 | 
			
		||||
                n1.cmp(&n2)
 | 
			
		||||
            }
 | 
			
		||||
            PeerTableColumn::NodeId => self.to_column(column).cmp(&other.to_column(column)),
 | 
			
		||||
            PeerTableColumn::Address => self.to_column(column).cmp(&other.to_column(column)),
 | 
			
		||||
            PeerTableColumn::LatencyAvg => self
 | 
			
		||||
                .peer_stats
 | 
			
		||||
 
 | 
			
		||||
@@ -753,7 +753,7 @@ impl UI {
 | 
			
		||||
            .full_screen();
 | 
			
		||||
 | 
			
		||||
        let peers_table_view = PeersTableView::new()
 | 
			
		||||
            .column(PeerTableColumn::NodeId, "Node Id", |c| c.width(43))
 | 
			
		||||
            .column(PeerTableColumn::NodeId, "Node Id", |c| c.width(48))
 | 
			
		||||
            .column(PeerTableColumn::Address, "Address", |c| c)
 | 
			
		||||
            .column(PeerTableColumn::LatencyAvg, "Ping", |c| c.width(8))
 | 
			
		||||
            .column(PeerTableColumn::TransferDownAvg, "Down", |c| c.width(8))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user