From 8f72b9ac79032ca808bc13df41dbb948730875e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Mon, 31 Jan 2022 13:37:03 +0100 Subject: [PATCH] element: display the rank in the description --- src/gps/element.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gps/element.rs b/src/gps/element.rs index 06d3d97..576ce69 100644 --- a/src/gps/element.rs +++ b/src/gps/element.rs @@ -72,9 +72,12 @@ impl ElementInfo { let mut desc = String::from(""); let feature = ElementInfo::element_feature(element_name) .ok_or_else(|| glib::bool_error!("Failed get element feature"))?; - + let rank = feature.rank(); if let Ok(factory) = feature.downcast::() { desc.push_str("Factory details:\n"); + desc.push_str("Rank:"); + desc.push_str(&format!("{:?}", rank)); + desc.push('\n'); desc.push_str("Name:"); desc.push_str(&factory.name()); desc.push('\n');