Skip to content

Commit

Permalink
Make sure tabled knows how to format tag maps
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Nov 28, 2024
1 parent 9c103bb commit b841ff8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/responses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,8 @@ pub struct Listener {
#[serde(transparent)]
pub struct TagMap(pub Map<String, serde_json::Value>);



impl fmt::Display for TagMap {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
for (k, v) in &self.0 {
Expand All @@ -748,7 +750,9 @@ pub struct Overview {
pub product_version: String,

// these two won't be available in 3.13.x
#[cfg_attr(feature = "tabled", tabled(display_with = "display_option"))]
pub cluster_tags: Option<TagMap>,
#[cfg_attr(feature = "tabled", tabled(display_with = "display_option"))]
pub node_tags: Option<TagMap>,

pub statistics_db_event_queue: u64,
Expand Down

0 comments on commit b841ff8

Please sign in to comment.