Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/ui/tabs/details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//! helpers that build the label/value lines and the click-to-copy
//! registry.

use std::fmt::Write as _;

use anyhow::Result;
use ratatui::{
Frame,
Expand Down Expand Up @@ -861,11 +863,12 @@ pub(in crate::ui) fn draw_connection_details(
info.message_class.to_string(),
label_style,
);
let txn_id = info
.transaction_id
.iter()
.map(|b| format!("{:02x}", b))
.collect::<String>();
let txn_id_bytes: &[u8] = &info.transaction_id;
let mut txn_id = String::with_capacity(txn_id_bytes.len() * 2);
for b in txn_id_bytes {
// Infallible: writing to a String never returns Err.
let _ = write!(txn_id, "{:02x}", b);
}
push_detail_field(
&mut details_text,
&mut detail_fields,
Expand Down